Skip to content

AntimaTiwari07/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,564 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0016-3sum-closest
0018-4sum
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0037-sudoku-solver
0039-combination-sum
0041-first-missing-positive
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0048-rotate-image
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0063-unique-paths-ii
0064-minimum-path-sum
0066-plus-one
0068-text-justification
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0081-search-in-rotated-sorted-array-ii
0084-largest-rectangle-in-histogram
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
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0135-candy
0137-single-number-ii
0139-word-break
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0179-largest-number
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0229-majority-element-ii
0238-product-of-array-except-self
0239-sliding-window-maximum
0260-single-number-iii
0274-h-index
0275-h-index-ii
0283-move-zeroes
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0368-largest-divisible-subset
0373-find-k-pairs-with-smallest-sums
0378-kth-smallest-element-in-a-sorted-matrix
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0462-minimum-moves-to-equal-array-elements-ii
0474-ones-and-zeroes
0485-max-consecutive-ones
0486-predict-the-winner
0494-target-sum
0496-next-greater-element-i
0503-next-greater-element-ii
0518-coin-change-ii
0539-minimum-time-difference
0540-single-element-in-a-sorted-array
0624-maximum-distance-in-arrays
0643-maximum-average-subarray-i
0645-set-mismatch
0654-maximum-binary-tree
0713-subarray-product-less-than-k
0719-find-k-th-smallest-pair-distance
0733-flood-fill
0744-find-smallest-letter-greater-than-target
0745-find-smallest-letter-greater-than-target
0780-max-chunks-to-make-sorted
0792-binary-search
0797-rabbits-in-forest
0853-most-profit-assigning-work
0878-shifting-letters
0898-transpose-matrix
0906-walking-robot-simulation
0907-koko-eating-bananas
0917-boats-to-save-people
0932-monotonic-array
0948-sort-an-array
0950-x-of-a-kind-in-a-deck-of-cards
0952-word-subsets
0966-binary-subarrays-with-sum
0967-minimum-falling-path-sum
0979-di-string-match
0983-validate-stack-sequences
0985-bag-of-tokens
1002-maximum-width-ramp
1014-k-closest-points-to-origin
1031-add-to-array-form-of-integer
1034-subarrays-with-k-different-integers
1039-find-the-town-judge
1049-minimum-domino-rotations-for-equal-row
1050-construct-binary-search-tree-from-preorder-traversal
1056-capacity-to-ship-packages-within-d-days
1072-next-greater-node-in-linked-list
1096-maximum-sum-of-two-non-overlapping-subarrays
1112-find-words-that-can-be-formed-by-characters
1200-minimum-absolute-difference
1206-corporate-flight-bookings
1227-number-of-equivalent-domino-pairs
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1305-number-of-visible-people-in-a-queue
1335-maximum-candies-allocated-to-k-children
1350-remove-sub-folders-from-the-filesystem
1390-four-divisors
1407-group-the-people-given-the-group-size-they-belong-to
1421-find-numbers-with-even-number-of-digits
1428-jump-game-iii
1449-print-words-vertically
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1482-minimum-number-of-days-to-make-m-bouquets
1486-find-the-distance-value-between-two-arrays
1570-final-prices-with-a-special-discount-in-a-shop
1580-shuffle-the-array
1586-longest-subarray-of-1s-after-deleting-one-element
1615-range-sum-of-sorted-subarray-sums
1631-number-of-sub-arrays-with-odd-sum
1635-number-of-good-pairs
1646-kth-missing-positive-number
1656-count-good-triplets
1669-minimum-cost-to-cut-a-stick
1675-magnetic-force-between-two-balls
1700-minimum-time-to-make-rope-colorful
1741-sort-array-by-increasing-frequency
1755-defuse-the-bomb
1849-maximum-absolute-sum-of-any-subarray
1877-minimize-maximum-pair-sum-in-array
1886-minimum-limit-of-balls-in-a-bag
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1940-maximum-xor-for-each-query
1951-find-the-winner-of-the-circular-game
1972-rotating-the-box
1975-maximum-matrix-sum
1984-minimum-difference-between-highest-and-lowest-of-k-scores
1993-sum-of-all-subset-xor-totals
2005-check-if-all-the-integers-in-a-range-are-covered
2048-build-array-from-permutation
2054-the-number-of-the-smallest-unoccupied-chair
2058-concatenation-of-array
2078-two-furthest-houses-with-different-colors
2089-maximum-matrix-sum
2094-remove-stones-to-minimize-the-total
2106-find-greatest-common-divisor-of-array
2107-find-unique-binary-string
2113-find-the-kth-largest-integer-in-the-array
2116-count-number-of-pairs-with-absolute-difference-k
2132-convert-1d-array-into-2d-array
2144-maximum-difference-between-increasing-elements
2155-find-missing-observations
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2169-simple-bank-system
2170-count-number-of-maximum-bitwise-or-subsets
2188-minimized-maximum-of-products-distributed-to-any-store
2210-find-target-indices-after-sorting-array
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2232-adding-spaces-to-a-string
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2269-count-elements-with-strictly-smaller-and-greater-elements
2277-count-equal-and-divisible-pairs-in-an-array
2292-counting-words-with-a-given-prefix
2308-divide-array-into-equal-pairs
2316-count-hills-and-valleys-in-an-array
2324-find-triangular-sum-of-an-array
2328-number-of-increasing-paths-in-a-grid
2341-count-prefixes-of-a-given-string
2358-number-of-ways-to-split-array
2366-maximum-bags-with-full-capacity-of-rocks
2386-min-max-game
2394-count-subarrays-with-score-less-than-k
2410-maximum-matching-of-players-with-trainers
2465-shifting-letters-ii
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2478-longest-nice-subarray
2497-maximum-matching-of-players-with-trainers
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
2551-apply-operations-to-an-array
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2598-shortest-distance-to-target-string-in-a-circular-array
2609-distinct-prime-factors-of-product-of-array
2614-maximum-count-of-positive-integer-and-negative-integer
2616-maximal-score-after-applying-k-operations
2634-minimum-common-value
2636-maximum-subsequence-score
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2720-minimize-the-maximum-difference-of-pairs
2766-find-the-prefix-common-array-of-two-arrays
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
2902-max-pair-sum-in-an-array
2917-count-pairs-whose-sum-is-less-than-target
2932-maximum-strong-pair-xor-i
2946-matrix-similarity-after-cyclic-shifts
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3114-beautiful-towers-i
3143-longest-unequal-adjacent-groups-subsequence-i
3152-maximum-value-of-an-ordered-triplet-ii
3154-maximum-value-of-an-ordered-triplet-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3194-find-words-containing-character
3209-minimum-number-of-coins-for-fruits
3213-count-subarrays-where-max-element-appears-at-least-k-times
3227-find-missing-and-repeated-values
3241-divide-array-into-arrays-with-max-difference
3242-count-elements-with-maximum-frequency
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3314-construct-the-minimum-bitwise-array-i
3332-minimum-operations-to-exceed-threshold-value-ii
3381-shortest-subarray-with-or-at-least-k-i
3427-special-array-ii
3430-count-days-without-meetings
3446-find-the-number-of-good-pairs-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3501-delete-nodes-from-linked-list-present-in-array
3507-find-the-count-of-numbers-which-are-not-special
3522-find-the-power-of-k-size-subarrays-i
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3605-construct-the-minimum-bitwise-array-i
3610-find-x-sum-of-all-k-long-subarrays-i
3612-adjacent-increasing-subarrays-detection-i
3621-minimum-operations-to-make-array-values-equal-to-k
3637-trionic-array-i
3639-zero-array-transformation-i
3643-zero-array-transformation-ii
3649-minimum-time-to-break-locks-i
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3685-count-subarrays-of-length-three-with-a-condition
3790-fruits-into-baskets-ii
3799-unique-3-digit-even-numbers

Math

0002-add-two-numbers
0007-reverse-integer
0013-roman-to-integer
0029-divide-two-integers
0048-rotate-image
0060-permutation-sequence
0062-unique-paths
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0096-unique-binary-search-trees
0202-happy-number
0231-power-of-two
0241-different-ways-to-add-parentheses
0258-add-digits
0263-ugly-number
0264-ugly-number-ii
0273-integer-to-english-words
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0368-largest-divisible-subset
0390-elimination-game
0400-nth-digit
0415-add-strings
0441-arranging-coins
0445-add-two-numbers-ii
0462-minimum-moves-to-equal-array-elements-ii
0486-predict-the-winner
0539-minimum-time-difference
0670-maximum-swap
0795-k-th-symbol-in-grammar
0797-rabbits-in-forest
0900-reordered-power-of-2
0950-x-of-a-kind-in-a-deck-of-cards
1013-fibonacci-number
1014-k-closest-points-to-origin
1031-add-to-array-form-of-integer
1086-divisor-game
1390-four-divisors
1421-find-numbers-with-even-number-of-digits
1444-number-of-steps-to-reduce-a-number-to-zero
1500-count-largest-group
1631-number-of-sub-arrays-with-odd-sum
1635-number-of-good-pairs
1642-water-bottles
1817-calculate-money-in-leetcode-bank
1889-check-if-number-is-a-sum-of-powers-of-three
1951-find-the-winner-of-the-circular-game
1993-sum-of-all-subset-xor-totals
2050-count-good-numbers
2106-find-greatest-common-divisor-of-array
2155-find-missing-observations
2160-minimum-operations-to-make-a-uni-value-grid
2288-count-operations-to-obtain-zero
2324-find-triangular-sum-of-an-array
2383-add-two-integers
2491-smallest-even-multiple
2571-find-the-pivot-integer
2608-count-the-digits-that-divide-a-number
2609-distinct-prime-factors-of-product-of-array
2645-pass-the-pillow
2649-count-total-number-of-colored-cells
2704-maximum-difference-by-remapping-a-digit
2802-find-the-punishment-number-of-an-integer
2946-matrix-similarity-after-cyclic-shifts
2998-count-symmetric-integers
3172-divisible-and-non-divisible-sums-difference
3210-count-beautiful-substrings-i
3227-find-missing-and-repeated-values
3275-minimum-number-of-pushes-to-type-word-i
3462-vowels-game-in-a-string
3507-find-the-count-of-numbers-which-are-not-special
3555-final-array-state-after-k-multiplication-operations-i
3581-the-two-sneaky-numbers-of-digitville
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3768-check-if-digits-are-equal-in-string-after-operations-i

Simulation

0054-spiral-matrix
0067-add-binary
0068-text-justification
0258-add-digits
0415-add-strings
0898-transpose-matrix
0906-walking-robot-simulation
0983-validate-stack-sequences
1449-print-words-vertically
1642-water-bottles
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game
2048-build-array-from-permutation
2058-concatenation-of-array
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2169-simple-bank-system
2232-adding-spaces-to-a-string
2265-partition-array-according-to-given-pivot
2288-count-operations-to-obtain-zero
2324-find-triangular-sum-of-an-array
2386-min-max-game
2470-removing-stars-from-a-string
2551-apply-operations-to-an-array
2645-pass-the-pillow
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2800-minimum-string-length-after-removing-substrings
2946-matrix-similarity-after-cyclic-shifts
3332-minimum-operations-to-exceed-threshold-value-ii
3447-clear-digits
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i
3768-check-if-digits-are-equal-in-string-after-operations-i
3790-fruits-into-baskets-ii

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0134-gas-station
0135-candy
0179-largest-number
0409-longest-palindrome
0455-assign-cookies
0624-maximum-distance-in-arrays
0670-maximum-swap
0765-couples-holding-hands
0778-reorganize-string
0780-max-chunks-to-make-sorted
0797-rabbits-in-forest
0853-most-profit-assigning-work
0917-boats-to-save-people
0957-minimum-add-to-make-parentheses-valid
0979-di-string-match
0985-bag-of-tokens
1049-minimum-domino-rotations-for-equal-row
1407-group-the-people-given-the-group-size-they-belong-to
1502-construct-k-palindrome-strings
1700-minimum-time-to-make-rope-colorful
1877-minimize-maximum-pair-sum-in-array
1975-maximum-matrix-sum
2078-two-furthest-houses-with-different-colors
2089-maximum-matrix-sum
2094-remove-stones-to-minimize-the-total
2095-minimum-number-of-swaps-to-make-the-string-balanced
2300-construct-string-with-repeat-limit
2337-remove-digit-from-number-to-maximize-result
2366-maximum-bags-with-full-capacity-of-rocks
2410-maximum-matching-of-players-with-trainers
2456-construct-smallest-number-from-di-string
2497-maximum-matching-of-players-with-trainers
2509-minimize-xor
2616-maximal-score-after-applying-k-operations
2636-maximum-subsequence-score
2640-maximum-number-of-integers-to-choose-from-a-range-i
2704-maximum-difference-by-remapping-a-digit
2720-minimize-the-maximum-difference-of-pairs
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3195-separate-black-and-white-balls
3241-divide-array-into-arrays-with-max-difference
3275-minimum-number-of-pushes-to-type-word-i

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0030-substring-with-concatenation-of-all-words
0036-valid-sudoku
0037-sudoku-solver
0041-first-missing-positive
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0128-longest-consecutive-sequence
0139-word-break
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0169-majority-element
0202-happy-number
0208-implement-trie-prefix-tree
0229-majority-element-ii
0242-valid-anagram
0264-ugly-number-ii
0290-word-pattern
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
0409-longest-palindrome
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0451-sort-characters-by-frequency
0496-next-greater-element-i
0567-permutation-in-string
0645-set-mismatch
0653-two-sum-iv-input-is-a-bst
0778-reorganize-string
0797-rabbits-in-forest
0900-reordered-power-of-2
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0931-maximum-frequency-stack
0950-x-of-a-kind-in-a-deck-of-cards
0952-word-subsets
0966-binary-subarrays-with-sum
1029-vertical-order-traversal-of-a-binary-tree
1034-subarrays-with-k-different-integers
1039-find-the-town-judge
1112-find-words-that-can-be-formed-by-characters
1227-number-of-equivalent-domino-pairs
1256-rank-transform-of-an-array
1264-maximum-number-of-words-you-can-type
1407-group-the-people-given-the-group-size-they-belong-to
1460-number-of-substrings-containing-all-three-characters
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1500-count-largest-group
1502-construct-k-palindrome-strings
1635-number-of-good-pairs
1741-sort-array-by-increasing-frequency
1904-second-largest-digit-in-a-string
1915-check-if-one-string-swap-can-make-strings-equal
2005-check-if-all-the-integers-in-a-range-are-covered
2054-the-number-of-the-smallest-unoccupied-chair
2059-unique-length-3-palindromic-subsequences
2107-find-unique-binary-string
2116-count-number-of-pairs-with-absolute-difference-k
2169-simple-bank-system
2215-finding-3-digit-even-numbers
2220-find-all-possible-recipes-from-given-supplies
2300-construct-string-with-repeat-limit
2308-divide-array-into-equal-pairs
2427-first-letter-to-appear-twice
2461-amount-of-time-for-binary-tree-to-be-infected
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2609-distinct-prime-factors-of-product-of-array
2634-minimum-common-value
2640-maximum-number-of-integers-to-choose-from-a-range-i
2695-find-score-of-an-array-after-marking-all-elements
2707-merge-two-2d-arrays-by-summing-values
2766-find-the-prefix-common-array-of-two-arrays
2856-count-complete-subarrays-in-an-array
2902-max-pair-sum-in-an-array
2932-maximum-strong-pair-xor-i
3210-count-beautiful-substrings-i
3227-find-missing-and-repeated-values
3242-count-elements-with-maximum-frequency
3267-find-longest-special-substring-that-occurs-thrice-i
3446-find-the-number-of-good-pairs-i
3455-minimum-length-of-string-after-operations
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3595-rearrange-k-substrings-to-form-target-string
3610-find-x-sum-of-all-k-long-subarrays-i
3621-minimum-operations-to-make-array-values-equal-to-k
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3753-maximum-difference-between-even-and-odd-frequency-i
3799-unique-3-digit-even-numbers

Matrix

0036-valid-sudoku
0037-sudoku-solver
0048-rotate-image
0054-spiral-matrix
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0329-longest-increasing-path-in-a-matrix
0378-kth-smallest-element-in-a-sorted-matrix
0417-pacific-atlantic-water-flow
0733-flood-fill
0898-transpose-matrix
0967-minimum-falling-path-sum
1972-rotating-the-box
1975-maximum-matrix-sum
2089-maximum-matrix-sum
2132-convert-1d-array-into-2d-array
2160-minimum-operations-to-make-a-uni-value-grid
2328-number-of-increasing-paths-in-a-grid
2946-matrix-similarity-after-cyclic-shifts
3227-find-missing-and-repeated-values

Bit Manipulation

0029-divide-two-integers
0067-add-binary
0078-subsets
0090-subsets-ii
0137-single-number-ii
0190-reverse-bits
0191-number-of-1-bits
0222-count-complete-tree-nodes
0231-power-of-two
0260-single-number-iii
0287-find-the-duplicate-number
0342-power-of-four
0389-find-the-difference
0645-set-mismatch
0795-k-th-symbol-in-grammar
1444-number-of-steps-to-reduce-a-number-to-zero
1940-maximum-xor-for-each-query
1993-sum-of-all-subset-xor-totals
2059-unique-length-3-palindromic-subsequences
2170-count-number-of-maximum-bitwise-or-subsets
2308-divide-array-into-equal-pairs
2323-minimum-bit-flips-to-convert-number
2427-first-letter-to-appear-twice
2478-longest-nice-subarray
2503-longest-subarray-with-maximum-bitwise-and
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2932-maximum-strong-pair-xor-i
3291-find-if-array-can-be-sorted
3314-construct-the-minimum-bitwise-array-i
3381-shortest-subarray-with-or-at-least-k-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3605-construct-the-minimum-bitwise-array-i
3649-minimum-time-to-break-locks-i

Brainteaser

1086-divisor-game
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
3462-vowels-game-in-a-string

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0008-string-to-integer-atoi
0010-regular-expression-matching
0013-roman-to-integer
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0030-substring-with-concatenation-of-all-words
0032-longest-valid-parentheses
0038-count-and-say
0058-length-of-last-word
0067-add-binary
0068-text-justification
0072-edit-distance
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0125-valid-palindrome
0131-palindrome-partitioning
0139-word-break
0151-reverse-words-in-a-string
0179-largest-number
0208-implement-trie-prefix-tree
0241-different-ways-to-add-parentheses
0242-valid-anagram
0257-binary-tree-paths
0273-integer-to-english-words
0290-word-pattern
0297-serialize-and-deserialize-binary-tree
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0392-is-subsequence
0394-decode-string
0409-longest-palindrome
0415-add-strings
0443-string-compression
0451-sort-characters-by-frequency
0459-repeated-substring-pattern
0474-ones-and-zeroes
0539-minimum-time-difference
0541-reverse-string-ii
0551-student-attendance-record-i
0557-reverse-words-in-a-string-iii
0567-permutation-in-string
0686-repeated-string-match
0696-count-binary-substrings
0778-reorganize-string
0868-push-dominoes
0878-shifting-letters
0920-uncommon-words-from-two-sentences
0952-word-subsets
0957-minimum-add-to-make-parentheses-valid
0979-di-string-match
1092-shortest-common-supersequence
1112-find-words-that-can-be-formed-by-characters
1128-remove-all-adjacent-duplicates-in-string
1143-longest-common-subsequence
1250-longest-common-subsequence
1264-maximum-number-of-words-you-can-type
1350-remove-sub-folders-from-the-filesystem
1449-print-words-vertically
1460-number-of-substrings-containing-all-three-characters
1502-construct-k-palindrome-strings
1537-maximum-score-after-splitting-a-string
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1667-find-kth-bit-in-nth-binary-string
1700-minimum-time-to-make-rope-colorful
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1904-second-largest-digit-in-a-string
1915-check-if-one-string-swap-can-make-strings-equal
2059-unique-length-3-palindromic-subsequences
2095-minimum-number-of-swaps-to-make-the-string-balanced
2107-find-unique-binary-string
2113-find-the-kth-largest-integer-in-the-array
2168-check-if-numbers-are-ascending-in-a-sentence
2220-find-all-possible-recipes-from-given-supplies
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2300-construct-string-with-repeat-limit
2337-remove-digit-from-number-to-maximize-result
2341-count-prefixes-of-a-given-string
2414-move-pieces-to-obtain-a-string
2427-first-letter-to-appear-twice
2456-construct-smallest-number-from-di-string
2465-shifting-letters-ii
2470-removing-stars-from-a-string
2580-circular-sentence
2598-shortest-distance-to-target-string-in-a-circular-array
2691-count-vowel-strings-in-ranges
2800-minimum-string-length-after-removing-substrings
2839-check-if-strings-can-be-made-equal-with-operations-i
3018-make-string-a-subsequence-using-cyclic-increments
3143-longest-unequal-adjacent-groups-subsequence-i
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3194-find-words-containing-character
3195-separate-black-and-white-balls
3210-count-beautiful-substrings-i
3267-find-longest-special-substring-that-occurs-thrice-i
3275-minimum-number-of-pushes-to-type-word-i
3309-count-prefix-and-suffix-pairs-i
3396-valid-word
3447-clear-digits
3451-string-compression-iii
3455-minimum-length-of-string-after-operations
3462-vowels-game-in-a-string
3595-rearrange-k-substrings-to-form-target-string
3617-find-the-original-typed-string-i
3753-maximum-difference-between-even-and-odd-frequency-i
3768-check-if-digits-are-equal-in-string-after-operations-i

Sorting

0015-3sum
0016-3sum-closest
0018-4sum
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0148-sort-list
0169-majority-element
0179-largest-number
0215-kth-largest-element-in-an-array
0229-majority-element-ii
0242-valid-anagram
0274-h-index
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0368-largest-divisible-subset
0378-kth-smallest-element-in-a-sorted-matrix
0389-find-the-difference
0451-sort-characters-by-frequency
0455-assign-cookies
0462-minimum-moves-to-equal-array-elements-ii
0539-minimum-time-difference
0645-set-mismatch
0719-find-k-th-smallest-pair-distance
0778-reorganize-string
0780-max-chunks-to-make-sorted
0853-most-profit-assigning-work
0900-reordered-power-of-2
0917-boats-to-save-people
0948-sort-an-array
0985-bag-of-tokens
1014-k-closest-points-to-origin
1029-vertical-order-traversal-of-a-binary-tree
1200-minimum-absolute-difference
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1482-how-many-numbers-are-smaller-than-the-current-number
1486-find-the-distance-value-between-two-arrays
1615-range-sum-of-sorted-subarray-sums
1669-minimum-cost-to-cut-a-stick
1675-magnetic-force-between-two-balls
1741-sort-array-by-increasing-frequency
1877-minimize-maximum-pair-sum-in-array
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2113-find-the-kth-largest-integer-in-the-array
2160-minimum-operations-to-make-a-uni-value-grid
2164-two-best-non-overlapping-events
2210-find-target-indices-after-sorting-array
2215-finding-3-digit-even-numbers
2269-count-elements-with-strictly-smaller-and-greater-elements
2366-maximum-bags-with-full-capacity-of-rocks
2410-maximum-matching-of-players-with-trainers
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2497-maximum-matching-of-players-with-trainers
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2636-maximum-subsequence-score
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
2699-count-the-number-of-fair-pairs
2891-maximum-beauty-of-an-array-after-applying-operation
2917-count-pairs-whose-sum-is-less-than-target
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3241-divide-array-into-arrays-with-max-difference
3291-find-if-array-can-be-sorted
3430-count-days-without-meetings
3595-rearrange-k-substrings-to-form-target-string

Counting

0169-majority-element
0229-majority-element-ii
0347-top-k-frequent-elements
0383-ransom-note
0387-first-unique-character-in-a-string
0451-sort-characters-by-frequency
0778-reorganize-string
0900-reordered-power-of-2
0920-uncommon-words-from-two-sentences
0950-x-of-a-kind-in-a-deck-of-cards
1034-subarrays-with-k-different-integers
1112-find-words-that-can-be-formed-by-characters
1227-number-of-equivalent-domino-pairs
1482-how-many-numbers-are-smaller-than-the-current-number
1502-construct-k-palindrome-strings
1635-number-of-good-pairs
1915-check-if-one-string-swap-can-make-strings-equal
2116-count-number-of-pairs-with-absolute-difference-k
2269-count-elements-with-strictly-smaller-and-greater-elements
2300-construct-string-with-repeat-limit
2308-divide-array-into-equal-pairs
2427-first-letter-to-appear-twice
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
3753-maximum-difference-between-even-and-odd-frequency-i

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0069-sqrtx
0074-search-a-2d-matrix
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0222-count-complete-tree-nodes
0275-h-index-ii
0278-first-bad-version
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0374-guess-number-higher-or-lower
0378-kth-smallest-element-in-a-sorted-matrix
0400-nth-digit
0441-arranging-coins
0540-single-element-in-a-sorted-array
0713-subarray-product-less-than-k
0719-find-k-th-smallest-pair-distance
0744-find-smallest-letter-greater-than-target
0745-find-smallest-letter-greater-than-target
0792-binary-search
0853-most-profit-assigning-work
0907-koko-eating-bananas
1056-capacity-to-ship-packages-within-d-days
1335-maximum-candies-allocated-to-k-children
1468-check-if-n-and-its-double-exist
1482-minimum-number-of-days-to-make-m-bouquets
1486-find-the-distance-value-between-two-arrays
1615-range-sum-of-sorted-subarray-sums
1646-kth-missing-positive-number
1675-magnetic-force-between-two-balls
1886-minimum-limit-of-balls-in-a-bag
2164-two-best-non-overlapping-events
2188-minimized-maximum-of-products-distributed-to-any-store
2210-find-target-indices-after-sorting-array
2394-count-subarrays-with-score-less-than-k
2586-longest-square-streak-in-an-array
2614-maximum-count-of-positive-integer-and-negative-integer
2634-minimum-common-value
2640-maximum-number-of-integers-to-choose-from-a-range-i
2665-minimum-time-to-repair-cars
2699-count-the-number-of-fair-pairs
2720-minimize-the-maximum-difference-of-pairs
2891-maximum-beauty-of-an-array-after-applying-operation
2917-count-pairs-whose-sum-is-less-than-target
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii
3643-zero-array-transformation-ii
3790-fruits-into-baskets-ii

Number Theory

0258-add-digits
0950-x-of-a-kind-in-a-deck-of-cards
2106-find-greatest-common-divisor-of-array
2491-smallest-even-multiple
2609-distinct-prime-factors-of-product-of-array
3210-count-beautiful-substrings-i
3507-find-the-count-of-numbers-which-are-not-special
3768-check-if-digits-are-equal-in-string-after-operations-i

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0037-sudoku-solver
0039-combination-sum
0046-permutations
0051-n-queens
0052-n-queens-ii
0077-combinations
0078-subsets
0079-word-search
0090-subsets-ii
0095-unique-binary-search-trees-ii
0113-path-sum-ii
0131-palindrome-partitioning
0257-binary-tree-paths
0494-target-sum
1993-sum-of-all-subset-xor-totals
2107-find-unique-binary-string
2170-count-number-of-maximum-bitwise-or-subsets
2456-construct-smallest-number-from-di-string
2802-find-the-punishment-number-of-an-integer
3649-minimum-time-to-break-locks-i

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0025-reverse-nodes-in-k-group
0060-permutation-sequence
0203-remove-linked-list-elements
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0326-power-of-three
0342-power-of-four
0390-elimination-game
0394-decode-string
0486-predict-the-winner
0795-k-th-symbol-in-grammar
1013-fibonacci-number
1667-find-kth-bit-in-nth-binary-string
1951-find-the-winner-of-the-circular-game
2050-count-good-numbers
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3799-unique-3-digit-even-numbers

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0016-3sum-closest
0018-4sum
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
0031-next-permutation
0042-trapping-rain-water
0061-rotate-list
0075-sort-colors
0082-remove-duplicates-from-sorted-list-ii
0086-partition-list
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0443-string-compression
0455-assign-cookies
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0567-permutation-in-string
0653-two-sum-iv-input-is-a-bst
0696-count-binary-substrings
0719-find-k-th-smallest-pair-distance
0853-most-profit-assigning-work
0868-push-dominoes
0908-middle-of-the-linked-list
0917-boats-to-save-people
0979-di-string-match
0985-bag-of-tokens
1468-check-if-n-and-its-double-exist
1486-find-the-distance-value-between-two-arrays
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1615-range-sum-of-sorted-subarray-sums
1877-minimize-maximum-pair-sum-in-array
1972-rotating-the-box
2095-minimum-number-of-swaps-to-make-the-string-balanced
2216-delete-the-middle-node-of-a-linked-list
2232-adding-spaces-to-a-string
2265-partition-array-according-to-given-pivot
2410-maximum-matching-of-players-with-trainers
2414-move-pieces-to-obtain-a-string
2497-maximum-matching-of-players-with-trainers
2551-apply-operations-to-an-array
2581-divide-players-into-teams-of-equal-skill
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
2917-count-pairs-whose-sum-is-less-than-target
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0053-maximum-subarray
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
0109-convert-sorted-list-to-binary-search-tree
0148-sort-list
0169-majority-element
0190-reverse-bits
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
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

Dynamic Programming

0005-longest-palindromic-substring
0010-regular-expression-matching
0022-generate-parentheses
0032-longest-valid-parentheses
0042-trapping-rain-water
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0091-decode-ways
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0124-binary-tree-maximum-path-sum
0131-palindrome-partitioning
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0300-longest-increasing-subsequence
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0368-largest-divisible-subset
0392-is-subsequence
0416-partition-equal-subset-sum
0474-ones-and-zeroes
0486-predict-the-winner
0494-target-sum
0518-coin-change-ii
0868-push-dominoes
0967-minimum-falling-path-sum
1013-fibonacci-number
1086-divisor-game
1092-shortest-common-supersequence
1096-maximum-sum-of-two-non-overlapping-subarrays
1143-longest-common-subsequence
1250-longest-common-subsequence
1263-number-of-dice-rolls-with-target-sum
1475-maximum-sum-bst-in-binary-tree
1586-longest-subarray-of-1s-after-deleting-one-element
1631-number-of-sub-arrays-with-odd-sum
1669-minimum-cost-to-cut-a-stick
1700-minimum-time-to-make-rope-colorful
1849-maximum-absolute-sum-of-any-subarray
2164-two-best-non-overlapping-events
2262-solving-questions-with-brainpower
2328-number-of-increasing-paths-in-a-grid
2586-longest-square-streak-in-an-array
3143-longest-unequal-adjacent-groups-subsequence-i
3209-minimum-number-of-coins-for-fruits
3649-minimum-time-to-break-locks-i

Game Theory

0486-predict-the-winner
1086-divisor-game
3462-vowels-game-in-a-string

Interactive

0278-first-bad-version
0374-guess-number-higher-or-lower

Stack

0020-valid-parentheses
0032-longest-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0234-palindrome-linked-list
0394-decode-string
0445-add-two-numbers-ii
0496-next-greater-element-i
0503-next-greater-element-ii
0654-maximum-binary-tree
0780-max-chunks-to-make-sorted
0931-maximum-frequency-stack
0937-online-stock-span
0957-minimum-add-to-make-parentheses-valid
0983-validate-stack-sequences
1002-maximum-width-ramp
1050-construct-binary-search-tree-from-preorder-traversal
1072-next-greater-node-in-linked-list
1128-remove-all-adjacent-duplicates-in-string
1305-number-of-visible-people-in-a-queue
1570-final-prices-with-a-special-discount-in-a-shop
2095-minimum-number-of-swaps-to-make-the-string-balanced
2456-construct-smallest-number-from-di-string
2470-removing-stars-from-a-string
2800-minimum-string-length-after-removing-substrings
3114-beautiful-towers-i
3447-clear-digits

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0496-next-greater-element-i
0503-next-greater-element-ii
0654-maximum-binary-tree
0780-max-chunks-to-make-sorted
0937-online-stock-span
1002-maximum-width-ramp
1050-construct-binary-search-tree-from-preorder-traversal
1072-next-greater-node-in-linked-list
1305-number-of-visible-people-in-a-queue
1570-final-prices-with-a-special-discount-in-a-shop
3114-beautiful-towers-i

Memoization

0070-climbing-stairs
0139-word-break
0241-different-ways-to-add-parentheses
0329-longest-increasing-path-in-a-matrix
1013-fibonacci-number
2328-number-of-increasing-paths-in-a-grid

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0713-subarray-product-less-than-k
0878-shifting-letters
0966-binary-subarrays-with-sum
1206-corporate-flight-bookings
1537-maximum-score-after-splitting-a-string
1631-number-of-sub-arrays-with-odd-sum
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1940-maximum-xor-for-each-query
2005-check-if-all-the-integers-in-a-range-are-covered
2059-unique-length-3-palindromic-subsequences
2358-number-of-ways-to-split-array
2394-count-subarrays-with-score-less-than-k
2465-shifting-letters-ii
2571-find-the-pivot-integer
2691-count-vowel-strings-in-ranges
3210-count-beautiful-substrings-i
3427-special-array-ii
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3639-zero-array-transformation-i
3643-zero-array-transformation-ii

Depth-First Search

0079-word-search
0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-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
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0130-surrounded-regions
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
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
0297-serialize-and-deserialize-binary-tree
0310-minimum-height-trees
0329-longest-increasing-path-in-a-matrix
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0733-flood-fill
0765-couples-holding-hands
0785-is-graph-bipartite
0841-keys-and-rooms
1029-vertical-order-traversal-of-a-binary-tree
1114-binary-search-tree-to-greater-sum-tree
1116-maximum-level-sum-of-a-binary-tree
1161-maximum-level-sum-of-a-binary-tree
1350-remove-sub-folders-from-the-filesystem
1428-jump-game-iii
1450-delete-leaves-with-a-given-value
1475-maximum-sum-bst-in-binary-tree
2121-find-if-path-exists-in-graph
2328-number-of-increasing-paths-in-a-grid
2461-amount-of-time-for-binary-tree-to-be-infected

Trie

0014-longest-common-prefix
0139-word-break
0208-implement-trie-prefix-tree
1350-remove-sub-folders-from-the-filesystem
2932-maximum-strong-pair-xor-i
3309-count-prefix-and-suffix-pairs-i

Sliding Window

0003-longest-substring-without-repeating-characters
0030-substring-with-concatenation-of-all-words
0076-minimum-window-substring
0209-minimum-size-subarray-sum
0239-sliding-window-maximum
0567-permutation-in-string
0643-maximum-average-subarray-i
0713-subarray-product-less-than-k
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1096-maximum-sum-of-two-non-overlapping-subarrays
1460-number-of-substrings-containing-all-three-characters
1586-longest-subarray-of-1s-after-deleting-one-element
1755-defuse-the-bomb
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2394-count-subarrays-with-score-less-than-k
2478-longest-nice-subarray
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
2932-maximum-strong-pair-xor-i
3213-count-subarrays-where-max-element-appears-at-least-k-times
3267-find-longest-special-substring-that-occurs-thrice-i
3381-shortest-subarray-with-or-at-least-k-i
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3522-find-the-power-of-k-size-subarrays-i
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0459-repeated-substring-pattern
0686-repeated-string-match
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

Geometry

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
0264-ugly-number-ii
0347-top-k-frequent-elements
0373-find-k-pairs-with-smallest-sums
0378-kth-smallest-element-in-a-sorted-matrix
0451-sort-characters-by-frequency
0778-reorganize-string
0948-sort-an-array
1014-k-closest-points-to-origin
2054-the-number-of-the-smallest-unoccupied-chair
2094-remove-stones-to-minimize-the-total
2113-find-the-kth-largest-integer-in-the-array
2164-two-best-non-overlapping-events
2300-construct-string-with-repeat-limit
2473-max-sum-of-a-pair-with-equal-sum-of-digits
2616-maximal-score-after-applying-k-operations
2636-maximum-subsequence-score
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2868-continuous-subarrays
3209-minimum-number-of-coins-for-fruits
3332-minimum-operations-to-exceed-threshold-value-ii
3555-final-array-state-after-k-multiplication-operations-i
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i

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

Merge Sort

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

Bucket Sort

0347-top-k-frequent-elements
0451-sort-characters-by-frequency
0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0274-h-index
0948-sort-an-array

Queue

0239-sliding-window-maximum
0387-first-unique-character-in-a-string
1951-find-the-winner-of-the-circular-game
2868-continuous-subarrays
3209-minimum-number-of-coins-for-fruits
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Ordered Set

0931-maximum-frequency-stack
2868-continuous-subarrays
3790-fruits-into-baskets-ii

Monotonic Queue

0239-sliding-window-maximum
2868-continuous-subarrays
3209-minimum-number-of-coins-for-fruits

Combinatorics

0062-unique-paths
1993-sum-of-all-subset-xor-totals
2324-find-triangular-sum-of-an-array
3768-check-if-digits-are-equal-in-string-after-operations-i

Enumeration

0900-reordered-power-of-2
1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2215-finding-3-digit-even-numbers
2337-remove-digit-from-number-to-maximize-result
2998-count-symmetric-integers
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3210-count-beautiful-substrings-i
3799-unique-3-digit-even-numbers

Bitmask

3649-minimum-time-to-break-locks-i

Rolling Hash

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

Hash Function

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

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0130-surrounded-regions
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
0310-minimum-height-trees
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0733-flood-fill
0765-couples-holding-hands
0785-is-graph-bipartite
0841-keys-and-rooms
1029-vertical-order-traversal-of-a-binary-tree
1116-maximum-level-sum-of-a-binary-tree
1161-maximum-level-sum-of-a-binary-tree
1428-jump-game-iii
2121-find-if-path-exists-in-graph
2328-number-of-increasing-paths-in-a-grid
2461-amount-of-time-for-binary-tree-to-be-infected
2646-kth-largest-sum-in-a-binary-tree

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
0025-reverse-nodes-in-k-group
0061-rotate-list
0082-remove-duplicates-from-sorted-list-ii
0083-remove-duplicates-from-sorted-list
0086-partition-list
0092-reverse-linked-list-ii
0109-convert-sorted-list-to-binary-search-tree
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
0148-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
0445-add-two-numbers-ii
0725-split-linked-list-in-parts
0908-middle-of-the-linked-list
1072-next-greater-node-in-linked-list
1765-merge-in-between-linked-lists
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2216-delete-the-middle-node-of-a-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Graph

0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0547-number-of-provinces
0785-is-graph-bipartite
0841-keys-and-rooms
1039-find-the-town-judge
1557-minimum-number-of-vertices-to-reach-all-nodes
2121-find-if-path-exists-in-graph
2220-find-all-possible-recipes-from-given-supplies

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0329-longest-increasing-path-in-a-matrix
2220-find-all-possible-recipes-from-given-supplies
2328-number-of-increasing-paths-in-a-grid

Design

0155-min-stack
0208-implement-trie-prefix-tree
0297-serialize-and-deserialize-binary-tree
0931-maximum-frequency-stack
0937-online-stock-span
2169-simple-bank-system

Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-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
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-to-binary-search-tree
0110-balanced-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
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
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
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0662-maximum-width-of-binary-tree
0783-search-in-a-binary-search-tree
1029-vertical-order-traversal-of-a-binary-tree
1050-construct-binary-search-tree-from-preorder-traversal
1114-binary-search-tree-to-greater-sum-tree
1116-maximum-level-sum-of-a-binary-tree
1161-maximum-level-sum-of-a-binary-tree
1450-delete-leaves-with-a-given-value
1475-maximum-sum-bst-in-binary-tree
2461-amount-of-time-for-binary-tree-to-be-infected
2646-kth-largest-sum-in-a-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-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
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-to-binary-search-tree
0110-balanced-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
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
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
0297-serialize-and-deserialize-binary-tree
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0543-diameter-of-binary-tree
0653-two-sum-iv-input-is-a-bst
0654-maximum-binary-tree
0662-maximum-width-of-binary-tree
0783-search-in-a-binary-search-tree
1029-vertical-order-traversal-of-a-binary-tree
1050-construct-binary-search-tree-from-preorder-traversal
1114-binary-search-tree-to-greater-sum-tree
1116-maximum-level-sum-of-a-binary-tree
1161-maximum-level-sum-of-a-binary-tree
1450-delete-leaves-with-a-given-value
1475-maximum-sum-bst-in-binary-tree
2461-amount-of-time-for-binary-tree-to-be-infected
2646-kth-largest-sum-in-a-binary-tree

Data Stream

0937-online-stock-span

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0547-number-of-provinces
0785-is-graph-bipartite
2121-find-if-path-exists-in-graph

Binary Search Tree

0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-to-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0538-convert-bst-to-greater-tree
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
1050-construct-binary-search-tree-from-preorder-traversal
1114-binary-search-tree-to-greater-sum-tree
1475-maximum-sum-bst-in-binary-tree

Segment Tree

3790-fruits-into-baskets-ii

Graph Theory

0329-longest-increasing-path-in-a-matrix
0765-couples-holding-hands
2328-number-of-increasing-paths-in-a-grid

Union-Find

0765-couples-holding-hands

About

practice LeetCode questions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors