Skip to content

anujjsengar/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

LeetCode Topics

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0024-swap-nodes-in-pairs
0083-remove-duplicates-from-sorted-list
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0147-insertion-sort-list
0160-intersection-of-two-linked-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0725-split-linked-list-in-parts
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
1484-linked-list-in-binary-tree
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2216-delete-the-middle-node-of-a-linked-list
2299-merge-nodes-in-between-zeros
2903-insert-greatest-common-divisors-in-linked-list

Divide and Conquer

0023-merge-k-sorted-lists
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements
0654-maximum-binary-tree
0948-sort-an-array
1014-k-closest-points-to-origin
2113-find-the-kth-largest-integer-in-the-array

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
0451-sort-characters-by-frequency
0506-relative-ranks
0658-find-k-closest-elements
0692-top-k-frequent-words
0744-network-delay-time
0802-k-th-smallest-prime-fraction
0803-cheapest-flights-within-k-stops
0948-sort-an-array
1014-k-closest-points-to-origin
1127-last-stone-weight
1463-the-k-weakest-rows-in-a-matrix
1574-maximum-product-of-two-elements-in-an-array
2094-remove-stones-to-minimize-the-total
2113-find-the-kth-largest-integer-in-the-array
2695-find-score-of-an-array-after-marking-all-elements
3226-minimum-number-game

Merge Sort

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

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0050-powx-n
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0326-power-of-three
0342-power-of-four
1951-find-the-winner-of-the-circular-game

Stack

0020-valid-parentheses
0042-trapping-rain-water
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0143-reorder-list
0145-binary-tree-postorder-traversal
0150-evaluate-reverse-polish-notation
0225-implement-stack-using-queues
0234-palindrome-linked-list
0654-maximum-binary-tree
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0874-backspace-string-compare
0933-increasing-order-search-tree
1078-remove-outermost-parentheses
1128-remove-all-adjacent-duplicates-in-string
1298-reverse-substrings-between-each-pair-of-parentheses
1497-design-a-stack-with-increment-operation
1720-crawler-log-folder
1818-maximum-score-from-removing-substrings
2221-check-if-a-parentheses-string-can-be-valid
2846-robot-collisions

Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0437-path-sum-iii
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0893-all-nodes-distance-k-in-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1030-smallest-string-starting-from-leaf
1079-sum-of-root-to-leaf-binary-numbers
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
1731-even-odd-tree
2384-root-equals-sum-of-children
2416-evaluate-boolean-binary-tree
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0386-lexicographical-numbers
0404-sum-of-left-leaves
0437-path-sum-iii
0463-island-perimeter
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0547-number-of-provinces
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0744-network-delay-time
0774-maximum-depth-of-n-ary-tree
0775-n-ary-tree-preorder-traversal
0776-n-ary-tree-postorder-traversal
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
0893-all-nodes-distance-k-in-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1030-smallest-string-starting-from-leaf
1079-sum-of-root-to-leaf-binary-numbers
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1350-remove-sub-folders-from-the-filesystem
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
2121-find-if-path-exists-in-graph
2416-evaluate-boolean-binary-tree
2677-cousins-in-binary-tree-ii

Binary Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0437-path-sum-iii
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0893-all-nodes-distance-k-in-binary-tree
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1030-smallest-string-starting-from-leaf
1079-sum-of-root-to-leaf-binary-numbers
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1427-all-elements-in-two-binary-search-trees
1450-delete-leaves-with-a-given-value
1484-linked-list-in-binary-tree
1731-even-odd-tree
2384-root-equals-sum-of-children
2416-evaluate-boolean-binary-tree
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0111-minimum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0404-sum-of-left-leaves
0463-island-perimeter
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0547-number-of-provinces
0617-merge-two-binary-trees
0623-add-one-row-to-tree
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0744-network-delay-time
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
0893-all-nodes-distance-k-in-binary-tree
1005-univalued-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1484-linked-list-in-binary-tree
1731-even-odd-tree
2121-find-if-path-exists-in-graph
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
3517-shortest-distance-after-road-addition-queries-i

Array

0001-two-sum
0011-container-with-most-water
0015-3sum
0016-3sum-closest
0026-remove-duplicates-from-sorted-array
0033-search-in-rotated-sorted-array
0035-search-insert-position
0041-first-missing-positive
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0049-group-anagrams
0055-jump-game
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0088-merge-sorted-array
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0134-gas-station
0136-single-number
0150-evaluate-reverse-polish-notation
0162-find-peak-element
0164-maximum-gap
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0198-house-robber
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0219-contains-duplicate-ii
0220-contains-duplicate-iii
0229-majority-element-ii
0239-sliding-window-maximum
0240-search-a-2d-matrix-ii
0283-move-zeroes
0300-longest-increasing-subsequence
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0377-combination-sum-iv
0463-island-perimeter
0494-target-sum
0506-relative-ranks
0523-continuous-subarray-sum
0532-k-diff-pairs-in-an-array
0560-subarray-sum-equals-k
0654-maximum-binary-tree
0658-find-k-closest-elements
0682-baseball-game
0689-maximum-sum-of-3-non-overlapping-subarrays
0735-asteroid-collision
0739-daily-temperatures
0747-min-cost-climbing-stairs
0792-binary-search
0802-k-th-smallest-prime-fraction
0882-peak-index-in-a-mountain-array
0890-lemonade-change
0917-boats-to-save-people
0941-sort-array-by-parity
0948-sort-an-array
1014-k-closest-points-to-origin
1016-subarray-sums-divisible-by-k
1039-find-the-town-judge
1127-last-stone-weight
1137-height-checker
1231-replace-elements-with-greatest-element-on-right-side
1346-maximize-the-topmost-element-after-k-moves
1350-remove-sub-folders-from-the-filesystem
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
1497-design-a-stack-with-increment-operation
1511-count-number-of-teams
1524-string-matching-in-an-array
1574-maximum-product-of-two-elements-in-an-array
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1755-defuse-the-bomb
1786-count-the-number-of-consistent-strings
1798-max-number-of-k-sum-pairs
1803-average-waiting-time
1878-check-if-array-is-sorted-and-rotated
1951-find-the-winner-of-the-circular-game
2026-merge-triplets-to-form-target-triplet
2094-remove-stones-to-minimize-the-total
2107-find-unique-binary-string
2113-find-the-kth-largest-integer-in-the-array
2132-convert-1d-array-into-2d-array
2292-counting-words-with-a-given-prefix
2308-divide-array-into-equal-pairs
2358-number-of-ways-to-split-array
2502-sort-the-people
2614-maximum-count-of-positive-integer-and-negative-integer
2640-maximum-number-of-integers-to-choose-from-a-range-i
2695-find-score-of-an-array-after-marking-all-elements
2727-number-of-senior-citizens
2756-buy-two-chocolates
2766-find-the-prefix-common-array-of-two-arrays
2846-robot-collisions
3219-make-lexicographically-smallest-array-by-swapping-elements
3226-minimum-number-game
3242-count-elements-with-maximum-frequency
3309-count-prefix-and-suffix-pairs-i
3373-maximum-prime-difference
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3517-shortest-distance-after-road-addition-queries-i

Sorting

0015-3sum
0016-3sum-closest
0049-group-anagrams
0088-merge-sorted-array
0147-insertion-sort-list
0164-maximum-gap
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0220-contains-duplicate-iii
0229-majority-element-ii
0242-valid-anagram
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0451-sort-characters-by-frequency
0506-relative-ranks
0532-k-diff-pairs-in-an-array
0658-find-k-closest-elements
0692-top-k-frequent-words
0802-k-th-smallest-prime-fraction
0917-boats-to-save-people
0941-sort-array-by-parity
0948-sort-an-array
1014-k-closest-points-to-origin
1029-vertical-order-traversal-of-a-binary-tree
1137-height-checker
1427-all-elements-in-two-binary-search-trees
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
1574-maximum-product-of-two-elements-in-an-array
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1741-sort-array-by-increasing-frequency
1798-max-number-of-k-sum-pairs
2113-find-the-kth-largest-integer-in-the-array
2502-sort-the-people
2640-maximum-number-of-integers-to-choose-from-a-range-i
2646-kth-largest-sum-in-a-binary-tree
2695-find-score-of-an-array-after-marking-all-elements
2756-buy-two-chocolates
2846-robot-collisions
3219-make-lexicographically-smallest-array-by-swapping-elements
3226-minimum-number-game

Quickselect

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

String

0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0030-substring-with-concatenation-of-all-words
0043-multiply-strings
0049-group-anagrams
0115-distinct-subsequences
0125-valid-palindrome
0242-valid-anagram
0257-binary-tree-paths
0344-reverse-string
0345-reverse-vowels-of-a-string
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0392-is-subsequence
0438-find-all-anagrams-in-a-string
0451-sort-characters-by-frequency
0520-detect-capital
0541-reverse-string-ii
0567-permutation-in-string
0692-top-k-frequent-words
0742-to-lower-case
0874-backspace-string-compare
0953-reverse-only-letters
0961-long-pressed-name
1030-smallest-string-starting-from-leaf
1078-remove-outermost-parentheses
1128-remove-all-adjacent-duplicates-in-string
1250-longest-common-subsequence
1298-reverse-substrings-between-each-pair-of-parentheses
1350-remove-sub-folders-from-the-filesystem
1502-construct-k-palindrome-strings
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1720-crawler-log-folder
1786-count-the-number-of-consistent-strings
1818-maximum-score-from-removing-substrings
2107-find-unique-binary-string
2113-find-the-kth-largest-integer-in-the-array
2221-check-if-a-parentheses-string-can-be-valid
2292-counting-words-with-a-given-prefix
2502-sort-the-people
2727-number-of-senior-citizens
2816-lexicographically-smallest-palindrome
3267-find-longest-special-substring-that-occurs-thrice-i
3309-count-prefix-and-suffix-pairs-i
3455-minimum-length-of-string-after-operations

Simulation

0043-multiply-strings
0682-baseball-game
0735-asteroid-collision
0874-backspace-string-compare
1803-average-waiting-time
1951-find-the-winner-of-the-circular-game
2132-convert-1d-array-into-2d-array
2278-find-three-consecutive-integers-that-sum-to-a-given-number
2299-merge-nodes-in-between-zeros
2645-pass-the-pillow
2695-find-score-of-an-array-after-marking-all-elements
2846-robot-collisions
3226-minimum-number-game

Math

0002-add-two-numbers
0007-reverse-integer
0043-multiply-strings
0050-powx-n
0062-unique-paths
0070-climbing-stairs
0096-unique-binary-search-trees
0150-evaluate-reverse-polish-notation
0172-factorial-trailing-zeroes
0189-rotate-array
0231-power-of-two
0263-ugly-number
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0523-continuous-subarray-sum
1014-k-closest-points-to-origin
1236-n-th-tribonacci-number
1411-convert-binary-number-in-a-linked-list-to-integer
1951-find-the-winner-of-the-circular-game
2278-find-three-consecutive-integers-that-sum-to-a-given-number
2645-pass-the-pillow
2903-insert-greatest-common-divisors-in-linked-list
3373-maximum-prime-difference
3476-find-minimum-operations-to-make-all-elements-divisible-by-three

Binary Search Tree

0033-search-in-rotated-sorted-array
0035-search-insert-position
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0240-search-a-2d-matrix-ii
0300-longest-increasing-subsequence
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0532-k-diff-pairs-in-an-array
0653-two-sum-iv-input-is-a-bst
0658-find-k-closest-elements
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0792-binary-search
0802-k-th-smallest-prime-fraction
0882-peak-index-in-a-mountain-array
0933-increasing-order-search-tree
0975-range-sum-of-bst
1427-all-elements-in-two-binary-search-trees
1463-the-k-weakest-rows-in-a-matrix
1468-check-if-n-and-its-double-exist
2614-maximum-count-of-positive-integer-and-negative-integer
2640-maximum-number-of-integers-to-choose-from-a-range-i
3267-find-longest-special-substring-that-occurs-thrice-i

Queue

0225-implement-stack-using-queues
0239-sliding-window-maximum
0387-first-unique-character-in-a-string
1951-find-the-winner-of-the-circular-game

Backtracking

0017-letter-combinations-of-a-phone-number
0046-permutations
0052-n-queens-ii
0090-subsets-ii
0113-path-sum-ii
0257-binary-tree-paths
0494-target-sum
0813-all-paths-from-source-to-target
1030-smallest-string-starting-from-leaf
2107-find-unique-binary-string

Bit Manipulation

0090-subsets-ii
0136-single-number
0222-count-complete-tree-nodes
0231-power-of-two
0338-counting-bits
0342-power-of-four
0389-find-the-difference
0476-number-complement
1054-complement-of-base-10-integer
1786-count-the-number-of-consistent-strings
2308-divide-array-into-equal-pairs
2766-find-the-prefix-common-array-of-two-arrays

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0134-gas-station
0890-lemonade-change
0917-boats-to-save-people
1346-maximize-the-topmost-element-after-k-moves
1502-construct-k-palindrome-strings
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1818-maximum-score-from-removing-substrings
2026-merge-triplets-to-form-target-triplet
2094-remove-stones-to-minimize-the-total
2221-check-if-a-parentheses-string-can-be-valid
2640-maximum-number-of-integers-to-choose-from-a-range-i
2756-buy-two-chocolates
2816-lexicographically-smallest-palindrome

Hash Table

0001-two-sum
0017-letter-combinations-of-a-phone-number
0030-substring-with-concatenation-of-all-words
0041-first-missing-positive
0049-group-anagrams
0073-set-matrix-zeroes
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0128-longest-consecutive-sequence
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0217-contains-duplicate
0219-contains-duplicate-ii
0229-majority-element-ii
0242-valid-anagram
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0438-find-all-anagrams-in-a-string
0451-sort-characters-by-frequency
0523-continuous-subarray-sum
0532-k-diff-pairs-in-an-array
0560-subarray-sum-equals-k
0567-permutation-in-string
0653-two-sum-iv-input-is-a-bst
0692-top-k-frequent-words
0893-all-nodes-distance-k-in-binary-tree
1016-subarray-sums-divisible-by-k
1029-vertical-order-traversal-of-a-binary-tree
1039-find-the-town-judge
1468-check-if-n-and-its-double-exist
1502-construct-k-palindrome-strings
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1798-max-number-of-k-sum-pairs
2107-find-unique-binary-string
2308-divide-array-into-equal-pairs
2502-sort-the-people
2640-maximum-number-of-integers-to-choose-from-a-range-i
2677-cousins-in-binary-tree-ii
2695-find-score-of-an-array-after-marking-all-elements
2766-find-the-prefix-common-array-of-two-arrays
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations

Two Pointers

0011-container-with-most-water
0015-3sum
0016-3sum-closest
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
0283-move-zeroes
0295-find-median-from-data-stream
0344-reverse-string
0345-reverse-vowels-of-a-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0532-k-diff-pairs-in-an-array
0541-reverse-string-ii
0567-permutation-in-string
0653-two-sum-iv-input-is-a-bst
0658-find-k-closest-elements
0802-k-th-smallest-prime-fraction
0874-backspace-string-compare
0908-middle-of-the-linked-list
0917-boats-to-save-people
0941-sort-array-by-parity
0953-reverse-only-letters
0961-long-pressed-name
1468-check-if-n-and-its-double-exist
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1798-max-number-of-k-sum-pairs
2216-delete-the-middle-node-of-a-linked-list
2816-lexicographically-smallest-palindrome

Number Theory

2903-insert-greatest-common-divisors-in-linked-list
3373-maximum-prime-difference

Trie

0014-longest-common-prefix
0386-lexicographical-numbers
0692-top-k-frequent-words
1350-remove-sub-folders-from-the-filesystem
3309-count-prefix-and-suffix-pairs-i

Matrix

0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0240-search-a-2d-matrix-ii
0463-island-perimeter
1463-the-k-weakest-rows-in-a-matrix
2132-convert-1d-array-into-2d-array

Dynamic Programming

0042-trapping-rain-water
0045-jump-game-ii
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0096-unique-binary-search-trees
0115-distinct-subsequences
0121-best-time-to-buy-and-sell-stock
0198-house-robber
0300-longest-increasing-subsequence
0338-counting-bits
0377-combination-sum-iv
0392-is-subsequence
0494-target-sum
0689-maximum-sum-of-3-non-overlapping-subarrays
0747-min-cost-climbing-stairs
0803-cheapest-flights-within-k-stops
1236-n-th-tribonacci-number
1250-longest-common-subsequence
1511-count-number-of-teams

Monotonic Stack

0042-trapping-rain-water
0654-maximum-binary-tree
0739-daily-temperatures

Memoization

0070-climbing-stairs
1236-n-th-tribonacci-number

Counting

0229-majority-element-ii
0347-top-k-frequent-elements
0383-ransom-note
0387-first-unique-character-in-a-string
0451-sort-characters-by-frequency
0692-top-k-frequent-words
1502-construct-k-palindrome-strings
1786-count-the-number-of-consistent-strings
2308-divide-array-into-equal-pairs
2614-maximum-count-of-positive-integer-and-negative-integer
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3455-minimum-length-of-string-after-operations

Bucket Sort

0164-maximum-gap
0220-contains-duplicate-iii
0347-top-k-frequent-elements
0451-sort-characters-by-frequency
0692-top-k-frequent-words
0948-sort-an-array

Radix Sort

0164-maximum-gap
0948-sort-an-array

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0572-subtree-of-another-tree
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
2292-counting-words-with-a-given-prefix
3309-count-prefix-and-suffix-pairs-i

Sliding Window

0030-substring-with-concatenation-of-all-words
0219-contains-duplicate-ii
0220-contains-duplicate-iii
0239-sliding-window-maximum
0438-find-all-anagrams-in-a-string
0567-permutation-in-string
0658-find-k-closest-elements
1755-defuse-the-bomb
3267-find-longest-special-substring-that-occurs-thrice-i

Binary Indexed Tree

1511-count-number-of-teams

Hash Function

0572-subtree-of-another-tree
3309-count-prefix-and-suffix-pairs-i

Counting Sort

0948-sort-an-array
1137-height-checker

Geometry

1014-k-closest-points-to-origin

Design

0225-implement-stack-using-queues
0295-find-median-from-data-stream
1497-design-a-stack-with-increment-operation

Data Stream

0295-find-median-from-data-stream

Union Find

0128-longest-consecutive-sequence
0547-number-of-provinces
0801-is-graph-bipartite
2121-find-if-path-exists-in-graph
3219-make-lexicographically-smallest-array-by-swapping-elements

Prefix Sum

0523-continuous-subarray-sum
0560-subarray-sum-equals-k
1016-subarray-sums-divisible-by-k
2358-number-of-ways-to-split-array

Monotonic Queue

0239-sliding-window-maximum

Graph

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0813-all-paths-from-source-to-target
1039-find-the-town-judge
1916-find-center-of-star-graph
2121-find-if-path-exists-in-graph
3189-find-champion-ii
3517-shortest-distance-after-road-addition-queries-i

Combinatorics

0062-unique-paths

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops

Ordered Set

0220-contains-duplicate-iii

Rolling Hash

3309-count-prefix-and-suffix-pairs-i

Topological Sort

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published