Leetcode
Array
- 1.two-sum
- 108.convert-sorted-array-to-binary-search-tree
- 118.pascals-triangle
- 119.pascals-triangle-ii
- 121.best-time-to-buy-and-sell-stock
- 122.best-time-to-buy-and-sell-stock-ii
- 123.best-time-to-buy-and-sell-stock-iii
- 130.surrounded-regions
- 136.single-number
- 1363.largest-multiple-of-three
- 1402.reducing-dishes
- 1646.get-maximum-in-generated-array
- 1665.minimum-initial-energy-to-finish-tasks
- 167.two-sum-ii-input-array-is-sorted
- 169.majority-element
- 1720.decode-xored-array
- 1748.sum-of-unique-elements
- 1862.sum-of-floored-pairs
- 1879.minimum-xor-sum-of-two-arrays
- 188.best-time-to-buy-and-sell-stock-iv
- 198.house-robber
- 2011.final-value-of-variable-after-performing-operations
- 2044.count-number-of-maximum-bitwise-or-subsets
- 217.contains-duplicate
- 219.contains-duplicate-ii
- 239.sliding-window-maximum
- 26.remove-duplicates-from-sorted-array
- 268.missing-number
- 27.remove-element
- 283.move-zeroes
- 303.range-sum-query-immutable
- 31.next-permutation
- 330.patching-array
- 34.find-first-and-last-position-of-element-in-sorted-array
- 349.intersection-of-two-arrays
- 35.search-insert-position
- 350.intersection-of-two-arrays-ii
- 4.median-of-two-sorted-arrays
- 41.first-missing-positive
- 410.split-array-largest-sum
- 414.third-maximum-number
- 442.find-all-duplicates-in-an-array
- 448.find-all-numbers-disappeared-in-an-array
- 453.minimum-moves-to-equal-array-elements
- 46.permutations
- 47.permutations-ii
- 485.max-consecutive-ones
- 506.relative-ranks
- 51.n-queens
- 53.maximum-subarray
- 540.single-element-in-a-sorted-array
- 55.jump-game
- 561.array-partition-i
- 575.distribute-candies
- 594.longest-harmonious-subsequence
- 605.can-place-flowers
- 643.maximum-average-subarray-i
- 645.set-mismatch
- 675.cut-off-trees-for-golf-event
- 73.set-matrix-zeroes
- 746.min-cost-climbing-stairs
- 75.sort-colors
- 78.subsets
- 80.remove-duplicates-from-sorted-array-ii
- 810.chalkboard-xor-game
- 879.profitable-schemes
- 88.merge-sorted-array
- 90.subsets-ii
- 905.sort-array-by-parity
- 954.array-of-doubled-pairs
Backtracking
- 131.palindrome-partitioning
- 140.word-break-ii
- 2044.count-number-of-maximum-bitwise-or-subsets
- 22.generate-parentheses
- 46.permutations
- 47.permutations-ii
- 51.n-queens
- 52.n-queens-ii
- 78.subsets
- 90.subsets-ii
Binary Search
- 167.two-sum-ii-input-array-is-sorted
- 1862.sum-of-floored-pairs
- 34.find-first-and-last-position-of-element-in-sorted-array
- 349.intersection-of-two-arrays
- 35.search-insert-position
- 350.intersection-of-two-arrays-ii
- 367.valid-perfect-square
- 374.guess-number-higher-or-lower
- 4.median-of-two-sorted-arrays
- 410.split-array-largest-sum
- 540.single-element-in-a-sorted-array
- 69.sqrtx
Binary Search Tree
Binary Tree
- 100.same-tree
- 102.binary-tree-level-order-traversal
- 104.maximum-depth-of-binary-tree
- 108.convert-sorted-array-to-binary-search-tree
- 110.balanced-binary-tree
- 111.minimum-depth-of-binary-tree
- 112.path-sum
- 124.binary-tree-maximum-path-sum
- 1302.deepest-leaves-sum
- 144.binary-tree-preorder-traversal
- 145.binary-tree-postorder-traversal
- 226.invert-binary-tree
- 297.serialize-and-deserialize-binary-tree
- 404.sum-of-left-leaves
- 94.binary-tree-inorder-traversal
- 99.recover-binary-search-tree
Bit Manipulation
- 136.single-number
- 1720.decode-xored-array
- 1879.minimum-xor-sum-of-two-arrays
- 190.reverse-bits
- 2044.count-number-of-maximum-bitwise-or-subsets
- 231.power-of-two
- 268.missing-number
- 29.divide-two-integers
- 338.counting-bits
- 389.find-the-difference
- 645.set-mismatch
- 67.add-binary
- 693.binary-number-with-alternating-bits
- 762.prime-number-of-set-bits-in-binary-representation
- 78.subsets
- 810.chalkboard-xor-game
- 90.subsets-ii
Bitmask
Brainteaser
Breadth-First Search
- 100.same-tree
- 102.binary-tree-level-order-traversal
- 104.maximum-depth-of-binary-tree
- 111.minimum-depth-of-binary-tree
- 112.path-sum
- 130.surrounded-regions
- 1302.deepest-leaves-sum
- 226.invert-binary-tree
- 297.serialize-and-deserialize-binary-tree
- 404.sum-of-left-leaves
- 675.cut-off-trees-for-golf-event
Combinatorics
Concurrency
- 1114.print-in-order
- 1115.print-foobar-alternately
- 1116.print-zero-even-odd
- 1117.building-h2o
- 1195.fizz-buzz-multithreaded
- 1226.the-dining-philosophers
Counting
- 1221.split-a-string-in-balanced-strings
- 1400.construct-k-palindrome-strings
- 169.majority-element
- 1748.sum-of-unique-elements
- 383.ransom-note
- 387.first-unique-character-in-a-string
Counting Sort
Data Stream
Depth-First Search
- 100.same-tree
- 104.maximum-depth-of-binary-tree
- 110.balanced-binary-tree
- 111.minimum-depth-of-binary-tree
- 112.path-sum
- 124.binary-tree-maximum-path-sum
- 130.surrounded-regions
- 1302.deepest-leaves-sum
- 144.binary-tree-preorder-traversal
- 145.binary-tree-postorder-traversal
- 226.invert-binary-tree
- 297.serialize-and-deserialize-binary-tree
- 404.sum-of-left-leaves
- 94.binary-tree-inorder-traversal
- 99.recover-binary-search-tree
Design
- 2034.stock-price-fluctuation
- 295.find-median-from-data-stream
- 297.serialize-and-deserialize-binary-tree
- 303.range-sum-query-immutable
Divide and Conquer
- 108.convert-sorted-array-to-binary-search-tree
- 169.majority-element
- 190.reverse-bits
- 23.merge-k-sorted-lists
- 4.median-of-two-sorted-arrays
- 53.maximum-subarray
Dynamic Programming
- 10.regular-expression-matching
- 1025.divisor-game
- 1137.n-th-tribonacci-number
- 115.distinct-subsequences
- 118.pascals-triangle
- 119.pascals-triangle-ii
- 121.best-time-to-buy-and-sell-stock
- 122.best-time-to-buy-and-sell-stock-ii
- 123.best-time-to-buy-and-sell-stock-iii
- 124.binary-tree-maximum-path-sum
- 131.palindrome-partitioning
- 132.palindrome-partitioning-ii
- 1363.largest-multiple-of-three
- 140.word-break-ii
- 1402.reducing-dishes
- 1510.stone-game-iv
- 1646.get-maximum-in-generated-array
- 1745.palindrome-partitioning-iv
- 1879.minimum-xor-sum-of-two-arrays
- 188.best-time-to-buy-and-sell-stock-iv
- 198.house-robber
- 22.generate-parentheses
- 32.longest-valid-parentheses
- 338.counting-bits
- 392.is-subsequence
- 410.split-array-largest-sum
- 44.wildcard-matching
- 5.longest-palindromic-substring
- 509.fibonacci-number
- 53.maximum-subarray
- 55.jump-game
- 552.student-attendance-record-ii
- 62.unique-paths
- 70.climbing-stairs
- 746.min-cost-climbing-stairs
- 879.profitable-schemes
Game Theory
Greedy
- 122.best-time-to-buy-and-sell-stock-ii
- 1221.split-a-string-in-balanced-strings
- 1363.largest-multiple-of-three
- 1400.construct-k-palindrome-strings
- 1402.reducing-dishes
- 1665.minimum-initial-energy-to-finish-tasks
- 179.largest-number
- 330.patching-array
- 409.longest-palindrome
- 410.split-array-largest-sum
- 44.wildcard-matching
- 55.jump-game
- 561.array-partition-i
- 605.can-place-flowers
- 954.array-of-doubled-pairs
Hash Function
Hash Table
- 1.two-sum
- 1399.count-largest-group
- 140.word-break-ii
- 1400.construct-k-palindrome-strings
- 169.majority-element
- 1748.sum-of-unique-elements
- 202.happy-number
- 2034.stock-price-fluctuation
- 205.isomorphic-strings
- 217.contains-duplicate
- 219.contains-duplicate-ii
- 268.missing-number
- 3.longest-substring-without-repeating-characters
- 349.intersection-of-two-arrays
- 350.intersection-of-two-arrays-ii
- 383.ransom-note
- 387.first-unique-character-in-a-string
- 389.find-the-difference
- 409.longest-palindrome
- 41.first-missing-positive
- 442.find-all-duplicates-in-an-array
- 448.find-all-numbers-disappeared-in-an-array
- 49.group-anagrams
- 575.distribute-candies
- 594.longest-harmonious-subsequence
- 645.set-mismatch
- 73.set-matrix-zeroes
- 954.array-of-doubled-pairs
Heap (Priority Queue)
- 2034.stock-price-fluctuation
- 23.merge-k-sorted-lists
- 239.sliding-window-maximum
- 295.find-median-from-data-stream
- 506.relative-ranks
- 675.cut-off-trees-for-golf-event
Interactive
Linked List
- 2.add-two-numbers
- 203.remove-linked-list-elements
- 206.reverse-linked-list
- 21.merge-two-sorted-lists
- 23.merge-k-sorted-lists
- 25.reverse-nodes-in-k-group
- 82.remove-duplicates-from-sorted-list-ii
- 83.remove-duplicates-from-sorted-list
Math
- 1025.divisor-game
- 1137.n-th-tribonacci-number
- 1399.count-largest-group
- 1510.stone-game-iv
- 1862.sum-of-floored-pairs
- 2.add-two-numbers
- 202.happy-number
- 231.power-of-two
- 258.add-digits
- 263.ugly-number
- 268.missing-number
- 29.divide-two-integers
- 292.nim-game
- 326.power-of-three
- 367.valid-perfect-square
- 412.fizz-buzz
- 415.add-strings
- 43.multiply-strings
- 453.minimum-moves-to-equal-array-elements
- 50.powx-n
- 509.fibonacci-number
- 60.permutation-sequence
- 62.unique-paths
- 67.add-binary
- 69.sqrtx
- 7.reverse-integer
- 70.climbing-stairs
- 728.self-dividing-numbers
- 762.prime-number-of-set-bits-in-binary-representation
- 810.chalkboard-xor-game
- 9.palindrome-number
Matrix
Memoization
Merge Sort
Monotonic Queue
Number Theory
Ordered Set
Prefix Sum
Queue
Recursion
- 10.regular-expression-matching
- 2.add-two-numbers
- 203.remove-linked-list-elements
- 206.reverse-linked-list
- 21.merge-two-sorted-lists
- 231.power-of-two
- 25.reverse-nodes-in-k-group
- 326.power-of-three
- 344.reverse-string
- 44.wildcard-matching
- 50.powx-n
- 509.fibonacci-number
- 60.permutation-sequence
Rolling Hash
Simulation
- 1646.get-maximum-in-generated-array
- 2011.final-value-of-variable-after-performing-operations
- 258.add-digits
- 412.fizz-buzz
- 415.add-strings
- 43.multiply-strings
- 67.add-binary
Sliding Window
- 219.contains-duplicate-ii
- 239.sliding-window-maximum
- 3.longest-substring-without-repeating-characters
- 643.maximum-average-subarray-i
Sorting
- 1402.reducing-dishes
- 1665.minimum-initial-energy-to-finish-tasks
- 169.majority-element
- 179.largest-number
- 217.contains-duplicate
- 268.missing-number
- 295.find-median-from-data-stream
- 349.intersection-of-two-arrays
- 350.intersection-of-two-arrays-ii
- 389.find-the-difference
- 414.third-maximum-number
- 49.group-anagrams
- 506.relative-ranks
- 561.array-partition-i
- 594.longest-harmonious-subsequence
- 645.set-mismatch
- 75.sort-colors
- 88.merge-sorted-array
- 905.sort-array-by-parity
- 954.array-of-doubled-pairs
Stack
- 144.binary-tree-preorder-traversal
- 145.binary-tree-postorder-traversal
- 20.valid-parentheses
- 32.longest-valid-parentheses
- 94.binary-tree-inorder-traversal
String
- 10.regular-expression-matching
- 115.distinct-subsequences
- 1221.split-a-string-in-balanced-strings
- 125.valid-palindrome
- 131.palindrome-partitioning
- 132.palindrome-partitioning-ii
- 14.longest-common-prefix
- 140.word-break-ii
- 1400.construct-k-palindrome-strings
- 1422.maximum-score-after-splitting-a-string
- 1745.palindrome-partitioning-iv
- 179.largest-number
- 20.valid-parentheses
- 2011.final-value-of-variable-after-performing-operations
- 205.isomorphic-strings
- 214.shortest-palindrome
- 22.generate-parentheses
- 28.implement-strstr
- 297.serialize-and-deserialize-binary-tree
- 3.longest-substring-without-repeating-characters
- 32.longest-valid-parentheses
- 344.reverse-string
- 383.ransom-note
- 387.first-unique-character-in-a-string
- 389.find-the-difference
- 392.is-subsequence
- 409.longest-palindrome
- 412.fizz-buzz
- 415.add-strings
- 43.multiply-strings
- 44.wildcard-matching
- 49.group-anagrams
- 5.longest-palindromic-substring
- 520.detect-capital
- 58.length-of-last-word
- 67.add-binary
- 796.rotate-string
String Matching
Tree
- 100.same-tree
- 102.binary-tree-level-order-traversal
- 104.maximum-depth-of-binary-tree
- 108.convert-sorted-array-to-binary-search-tree
- 110.balanced-binary-tree
- 111.minimum-depth-of-binary-tree
- 112.path-sum
- 124.binary-tree-maximum-path-sum
- 1302.deepest-leaves-sum
- 144.binary-tree-preorder-traversal
- 145.binary-tree-postorder-traversal
- 226.invert-binary-tree
- 297.serialize-and-deserialize-binary-tree
- 404.sum-of-left-leaves
- 94.binary-tree-inorder-traversal
- 99.recover-binary-search-tree
Trie
Two Pointers
- 125.valid-palindrome
- 167.two-sum-ii-input-array-is-sorted
- 202.happy-number
- 26.remove-duplicates-from-sorted-array
- 27.remove-element
- 28.implement-strstr
- 283.move-zeroes
- 295.find-median-from-data-stream
- 31.next-permutation
- 344.reverse-string
- 349.intersection-of-two-arrays
- 350.intersection-of-two-arrays-ii
- 392.is-subsequence
- 75.sort-colors
- 80.remove-duplicates-from-sorted-array-ii
- 82.remove-duplicates-from-sorted-list-ii
- 88.merge-sorted-array
- 905.sort-array-by-parity
Union Find
最后更新: October 11, 2023