Skip to content

stanleypangg/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0026-remove-duplicates-from-sorted-array
0033-search-in-rotated-sorted-array
0035-search-insert-position
0036-valid-sudoku
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0046-permutations
0049-group-anagrams
0051-n-queens
0066-plus-one
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0084-largest-rectangle-in-histogram
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0130-surrounded-regions
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0212-word-search-ii
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0239-sliding-window-maximum
0268-missing-number
0287-find-the-duplicate-number
0322-coin-change
0347-top-k-frequent-elements
0417-pacific-atlantic-water-flow
0621-task-scheduler
0682-baseball-game
0695-max-area-of-island
0739-daily-temperatures
0792-binary-search
0906-walking-robot-simulation
0907-koko-eating-bananas
0948-sort-an-array
0967-minimum-falling-path-sum
1014-k-closest-points-to-origin
1036-rotting-oranges
1127-last-stone-weight
1231-replace-elements-with-greatest-element-on-right-side
1603-running-sum-of-1d-array
1791-richest-customer-wealth
1962-single-threaded-cpu
2058-concatenation-of-array
2195-time-needed-to-buy-tickets
2727-number-of-senior-citizens
3170-find-indices-with-index-and-value-difference-ii
3194-find-words-containing-character
3790-fruits-into-baskets-ii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0128-longest-consecutive-sequence
0133-clone-graph
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0146-lru-cache
0208-implement-trie-prefix-tree
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0355-design-twitter
0383-ransom-note
0387-first-unique-character-in-a-string
0424-longest-repeating-character-replacement
0567-permutation-in-string
0621-task-scheduler
0906-walking-robot-simulation
1023-time-based-key-value-store
1512-design-underground-system
1960-check-if-the-sentence-is-pangram
3753-maximum-difference-between-even-and-odd-frequency-i

Sorting

0015-3sum
0049-group-anagrams
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0621-task-scheduler
0948-sort-an-array
1014-k-closest-points-to-origin
1962-single-threaded-cpu

Simulation

0067-add-binary
0412-fizz-buzz
0682-baseball-game
0906-walking-robot-simulation
2058-concatenation-of-array
2178-walking-robot-simulation-ii
2195-time-needed-to-buy-tickets
3790-fruits-into-baskets-ii

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0058-length-of-last-word
0067-add-binary
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0125-valid-palindrome
0131-palindrome-partitioning
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0242-valid-anagram
0297-serialize-and-deserialize-binary-tree
0344-reverse-string
0383-ransom-note
0387-first-unique-character-in-a-string
0392-is-subsequence
0412-fizz-buzz
0424-longest-repeating-character-replacement
0520-detect-capital
0567-permutation-in-string
0647-palindromic-substrings
0680-valid-palindrome-ii
0742-to-lower-case
1023-time-based-key-value-store
1302-delete-characters-to-make-fancy-string
1512-design-underground-system
1714-rearrange-spaces-between-words
1894-merge-strings-alternately
1960-check-if-the-sentence-is-pangram
2154-minimum-moves-to-convert-string
2346-largest-3-same-digit-number-in-string
2727-number-of-senior-citizens
3194-find-words-containing-character
3379-score-of-a-string
3617-find-the-original-typed-string-i
3753-maximum-difference-between-even-and-odd-frequency-i

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0948-sort-an-array
1014-k-closest-points-to-origin

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0355-design-twitter
0621-task-scheduler
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0948-sort-an-array
1014-k-closest-points-to-origin
1127-last-stone-weight
1962-single-threaded-cpu

Bucket Sort

0347-top-k-frequent-elements
0948-sort-an-array

Counting

0347-top-k-frequent-elements
0383-ransom-note
0387-first-unique-character-in-a-string
0621-task-scheduler
3753-maximum-difference-between-even-and-odd-frequency-i

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
1603-running-sum-of-1d-array

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0684-redundant-connection
0695-max-area-of-island

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0042-trapping-rain-water
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0295-find-median-from-data-stream
0344-reverse-string
0392-is-subsequence
0567-permutation-in-string
0647-palindromic-substrings
0680-valid-palindrome-ii
0908-middle-of-the-linked-list
1894-merge-strings-alternately
3170-find-indices-with-index-and-value-difference-ii

Greedy

0011-container-with-most-water
0122-best-time-to-buy-and-sell-stock-ii
0621-task-scheduler
0680-valid-palindrome-ii
2154-minimum-moves-to-convert-string

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0143-reorder-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0155-min-stack
0682-baseball-game
0739-daily-temperatures

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list
0355-design-twitter
0838-design-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0143-reorder-list
0206-reverse-linked-list
1013-fibonacci-number

Matrix

0036-valid-sudoku
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0212-word-search-ii
0417-pacific-atlantic-water-flow
0695-max-area-of-island
0967-minimum-falling-path-sum
1036-rotting-oranges
1791-richest-customer-wealth

Design

0146-lru-cache
0155-min-stack
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0295-find-median-from-data-stream
0297-serialize-and-deserialize-binary-tree
0355-design-twitter
0789-kth-largest-element-in-a-stream
0838-design-linked-list
1023-time-based-key-value-store
1512-design-underground-system
2178-walking-robot-simulation-ii

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0268-missing-number
0287-find-the-duplicate-number
0374-guess-number-higher-or-lower
0792-binary-search
0907-koko-eating-bananas
1023-time-based-key-value-store
3790-fruits-into-baskets-ii

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1544-count-good-nodes-in-binary-tree

Depth-First Search

0079-word-search
0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0133-clone-graph
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0211-design-add-and-search-words-data-structure
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0417-pacific-atlantic-water-flow
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
1544-count-good-nodes-in-binary-tree

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0297-serialize-and-deserialize-binary-tree
0322-coin-change
0417-pacific-atlantic-water-flow
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
1036-rotting-oranges
1544-count-good-nodes-in-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0297-serialize-and-deserialize-binary-tree
0337-house-robber-iii
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0789-kth-largest-element-in-a-stream
1544-count-good-nodes-in-binary-tree

Math

0002-add-two-numbers
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0268-missing-number
0292-nim-game
0412-fizz-buzz
1013-fibonacci-number
1014-k-closest-points-to-origin
1411-convert-binary-number-in-a-linked-list-to-integer
1444-number-of-steps-to-reduce-a-number-to-zero
2752-sum-multiples

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0042-trapping-rain-water
0070-climbing-stairs
0091-decode-ways
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0124-binary-tree-maximum-path-sum
0131-palindrome-partitioning
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0322-coin-change
0337-house-robber-iii
0392-is-subsequence
0647-palindromic-substrings
0967-minimum-falling-path-sum
1013-fibonacci-number

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0051-n-queens
0077-combinations
0078-subsets
0079-word-search
0090-subsets-ii
0131-palindrome-partitioning
0212-word-search-ii

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0739-daily-temperatures

Bit Manipulation

0067-add-binary
0078-subsets
0090-subsets-ii
0268-missing-number
0287-find-the-duplicate-number
1444-number-of-steps-to-reduce-a-number-to-zero

Database

0175-combine-two-tables
0595-big-countries
1509-replace-employee-id-with-the-unique-identifier
1908-recyclable-and-low-fat-products

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0789-kth-largest-element-in-a-stream

String Matching

0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0209-minimum-size-subarray-sum
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0567-permutation-in-string

Memoization

0070-climbing-stairs
1013-fibonacci-number

Merge Sort

0023-merge-k-sorted-lists
0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array

Data Stream

0295-find-median-from-data-stream
0789-kth-largest-element-in-a-stream

Geometry

1014-k-closest-points-to-origin

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0684-redundant-connection
0744-network-delay-time

Topological Sort

0207-course-schedule
0210-course-schedule-ii

Doubly-Linked List

0146-lru-cache

Trie

0014-longest-common-prefix
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii

Queue

0239-sliding-window-maximum
0387-first-unique-character-in-a-string
2195-time-needed-to-buy-tickets

Monotonic Queue

0239-sliding-window-maximum

Brainteaser

0292-nim-game

Game Theory

0292-nim-game

Interactive

0374-guess-number-higher-or-lower

Shortest Path

0744-network-delay-time

Segment Tree

3790-fruits-into-baskets-ii

Ordered Set

3790-fruits-into-baskets-ii

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published