Skip to content

Suvansh16/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

Array

0026-remove-duplicates-from-sorted-array
0031-next-permutation
0040-combination-sum-ii
0045-jump-game-ii
0055-jump-game
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0078-subsets
0079-word-search
0090-subsets-ii
0120-triangle
0198-house-robber
0200-number-of-islands
0212-word-search-ii
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0322-coin-change
0368-largest-divisible-subset
0399-evaluate-division
0403-frog-jump
0416-partition-equal-subset-sum
0442-find-all-duplicates-in-an-array
0494-target-sum
0518-coin-change-ii
0539-minimum-time-difference
0594-longest-harmonious-subsequence
0632-smallest-range-covering-elements-from-k-lists
0648-replace-words
0689-maximum-sum-of-3-non-overlapping-subarrays
0729-my-calendar-i
0733-flood-fill
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0797-rabbits-in-forest
0833-bus-routes
0843-binary-trees-with-factors
0859-design-circular-deque
0869-similar-string-groups
0892-shortest-subarray-with-sum-at-least-k
0902-minimum-number-of-refueling-stops
0905-length-of-longest-fibonacci-subsequence
0907-koko-eating-bananas
0909-stone-game
0911-profitable-schemes
0945-snakes-and-ladders
0966-binary-subarrays-with-sum
0967-minimum-falling-path-sum
0983-validate-stack-sequences
0993-tallest-billboard
1025-minimum-cost-for-tickets
1032-satisfiability-of-equality-equations
1049-minimum-domino-rotations-for-equal-row
1063-best-sightseeing-pair
1105-uncrossed-lines
1147-flip-columns-for-maximum-number-of-equal-rows
1171-shortest-path-in-binary-matrix
1220-smallest-sufficient-team
1227-number-of-equivalent-domino-pairs
1240-stone-game-ii
1293-three-consecutive-odds
1352-maximum-profit-in-job-scheduling
1360-maximum-length-of-a-concatenated-string-with-unique-characters
1393-maximum-value-of-k-coins-from-piles
1418-fair-distribution-of-cookies
1421-find-numbers-with-even-number-of-digits
1435-xor-queries-of-a-subarray
1457-minimum-difficulty-of-a-job-schedule
1477-product-of-the-last-k-numbers
1503-reducing-dishes
1522-stone-game-iii
1524-string-matching-in-an-array
1570-final-prices-with-a-special-discount-in-a-shop
1620-check-if-array-pairs-are-divisible-by-k
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1656-count-good-triplets
1669-minimum-cost-to-cut-a-stick
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1680-count-all-possible-routes
1694-make-sum-divisible-by-p
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1755-defuse-the-bomb
1815-checking-existence-of-edge-length-limited-paths
1819-construct-the-lexicographically-largest-valid-sequence
1851-maximum-number-of-events-that-can-be-attended-ii
1866-restore-the-array-from-adjacent-pairs
1878-check-if-array-is-sorted-and-rotated
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1917-maximum-average-pass-ratio
1923-sentence-similarity-iii
1940-maximum-xor-for-each-query
1972-rotating-the-box
1993-sum-of-all-subset-xor-totals
1995-finding-pairs-with-a-certain-sum
2038-nearest-exit-from-entrance-in-maze
2089-maximum-matrix-sum
2096-find-the-longest-valid-obstacle-course-at-each-position
2164-two-best-non-overlapping-events
2170-count-number-of-maximum-bitwise-or-subsets
2176-parallel-courses-iii
2180-maximum-number-of-tasks-you-can-assign
2188-minimized-maximum-of-products-distributed-to-any-store
2206-detonate-the-maximum-bombs
2232-adding-spaces-to-a-string
2249-count-the-hidden-sequences
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2277-count-equal-and-divisible-pairs-in-an-array
2280-count-good-triplets-in-an-array
2320-find-all-k-distant-indices-in-an-array
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2364-longest-path-with-different-adjacent-characters
2375-minimum-obstacle-removal-to-reach-corner
2394-count-subarrays-with-score-less-than-k
2409-number-of-increasing-paths-in-a-grid
2465-shifting-letters-ii
2472-build-a-matrix-with-conditions
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2503-longest-subarray-with-maximum-bitwise-and
2551-apply-operations-to-an-array
2552-maximum-sum-of-distinct-subarrays-with-length-k
2554-minimum-total-distance-traveled
2564-most-profitable-path-in-a-tree
2586-longest-square-streak-in-an-array
2588-maximum-number-of-points-from-grid-queries
2591-frog-jump-ii
2616-maximal-score-after-applying-k-operations
2626-count-the-number-of-good-subarrays
2665-minimum-time-to-repair-cars
2681-put-marbles-in-bags
2691-count-vowel-strings-in-ranges
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
2711-minimum-time-to-visit-a-cell-in-a-grid
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
3142-longest-unequal-adjacent-groups-subsequence-ii
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
3181-find-building-where-alice-and-bob-can-meet
3227-find-missing-and-repeated-values
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix
3332-minimum-operations-to-exceed-threshold-value-ii
3348-minimum-cost-walk-in-weighted-graph
3380-shortest-subarray-with-or-at-least-k-ii
3427-special-array-ii
3430-count-days-without-meetings
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3490-find-the-maximum-length-of-valid-subsequence-i
3522-find-the-power-of-k-size-subarrays-i
3555-final-array-state-after-k-multiplication-operations-i
3621-minimum-operations-to-make-array-values-equal-to-k
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3647-zero-array-transformation-iii
3656-minimum-number-of-operations-to-make-elements-in-array-distinct
3685-count-subarrays-of-length-three-with-a-condition
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3831-find-x-value-of-array-i

Stack

0780-max-chunks-to-make-sorted
0983-validate-stack-sequences
1197-parsing-a-boolean-expression
1570-final-prices-with-a-special-discount-in-a-shop
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2095-minimum-number-of-swaps-to-make-the-string-balanced
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2800-minimum-string-length-after-removing-substrings
3181-find-building-where-alice-and-bob-can-meet
3445-lexicographically-minimum-string-after-removing-stars

Simulation

0983-validate-stack-sequences
1667-find-kth-bit-in-nth-binary-string
2232-adding-spaces-to-a-string
2265-partition-array-according-to-given-pivot
2343-count-unguarded-cells-in-the-grid
2551-apply-operations-to-an-array
2695-find-score-of-an-array-after-marking-all-elements
2800-minimum-string-length-after-removing-substrings
3332-minimum-operations-to-exceed-threshold-value-ii
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i

String

0005-longest-palindromic-substring
0038-count-and-say
0072-edit-distance
0079-word-search
0087-scramble-string
0212-word-search-ii
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0399-evaluate-division
0433-minimum-genetic-mutation
0516-longest-palindromic-subsequence
0539-minimum-time-difference
0648-replace-words
0768-partition-labels
0812-rotate-string
0868-push-dominoes
0869-similar-string-groups
0920-uncommon-words-from-two-sentences
0962-flip-string-to-monotone-increasing
1032-satisfiability-of-equality-equations
1058-lexicographically-smallest-equivalent-string
1197-parsing-a-boolean-expression
1250-longest-common-subsequence
1304-longest-happy-string
1360-maximum-length-of-a-concatenated-string-with-unique-characters
1437-minimum-insertion-steps-to-make-a-string-palindrome
1517-restore-the-array
1524-string-matching-in-an-array
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
1715-split-a-string-into-the-max-number-of-unique-substrings
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
1923-sentence-similarity-iii
2059-unique-length-3-palindromic-subsequences
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2300-construct-string-with-repeat-limit
2345-minimum-number-of-operations-to-convert-time
2364-longest-path-with-different-adjacent-characters
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2465-shifting-letters-ii
2494-sum-of-prefix-scores-of-strings
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2580-circular-sentence
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
2755-extra-characters-in-a-string
2800-minimum-string-length-after-removing-substrings
3018-make-string-a-subsequence-using-cyclic-increments
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3195-separate-black-and-white-balls
3243-count-the-number-of-powerful-integers
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix
3445-lexicographically-minimum-string-after-removing-stars
3451-string-compression-iii
3617-find-the-original-typed-string-i
3753-maximum-difference-between-even-and-odd-frequency-i

Dynamic Programming

0005-longest-palindromic-substring
0045-jump-game-ii
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0087-scramble-string
0120-triangle
0124-binary-tree-maximum-path-sum
0198-house-robber
0241-different-ways-to-add-parentheses
0279-perfect-squares
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0322-coin-change
0368-largest-divisible-subset
0403-frog-jump
0416-partition-equal-subset-sum
0494-target-sum
0516-longest-palindromic-subsequence
0518-coin-change-ii
0689-maximum-sum-of-3-non-overlapping-subarrays
0806-domino-and-tromino-tiling
0815-champagne-tower
0843-binary-trees-with-factors
0863-sum-of-distances-in-tree
0868-push-dominoes
0902-minimum-number-of-refueling-stops
0905-length-of-longest-fibonacci-subsequence
0909-stone-game
0911-profitable-schemes
0956-number-of-music-playlists
0962-flip-string-to-monotone-increasing
0967-minimum-falling-path-sum
0993-tallest-billboard
1008-binary-tree-cameras
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1105-uncrossed-lines
1220-smallest-sufficient-team
1240-stone-game-ii
1250-longest-common-subsequence
1352-maximum-profit-in-job-scheduling
1393-maximum-value-of-k-coins-from-piles
1418-fair-distribution-of-cookies
1437-minimum-insertion-steps-to-make-a-string-palindrome
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1457-minimum-difficulty-of-a-job-schedule
1503-reducing-dishes
1517-restore-the-array
1522-stone-game-iii
1669-minimum-cost-to-cut-a-stick
1680-count-all-possible-routes
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1851-maximum-number-of-events-that-can-be-attended-ii
2090-number-of-ways-to-arrive-at-destination
2164-two-best-non-overlapping-events
2176-parallel-courses-iii
2262-solving-questions-with-brainpower
2409-number-of-increasing-paths-in-a-grid
2415-count-the-number-of-ideal-arrays
2554-minimum-total-distance-traveled
2562-count-ways-to-build-good-strings
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3243-count-the-number-of-powerful-integers
3490-find-the-maximum-length-of-valid-subsequence-i
3831-find-x-value-of-array-i

Greedy

0045-jump-game-ii
0055-jump-game
0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0768-partition-labels
0780-max-chunks-to-make-sorted
0797-rabbits-in-forest
0902-minimum-number-of-refueling-stops
1049-minimum-domino-rotations-for-equal-row
1304-longest-happy-string
1503-reducing-dishes
1529-max-difference-you-can-get-from-changing-an-integer
1917-maximum-average-pass-ratio
2089-maximum-matrix-sum
2095-minimum-number-of-swaps-to-make-the-string-balanced
2180-maximum-number-of-tasks-you-can-assign
2300-construct-string-with-repeat-limit
2345-minimum-number-of-operations-to-convert-time
2488-divide-intervals-into-minimum-number-of-groups
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2591-frog-jump-ii
2616-maximal-score-after-applying-k-operations
2681-put-marbles-in-bags
2704-maximum-difference-by-remapping-a-digit
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii
3445-lexicographically-minimum-string-after-removing-stars
3647-zero-array-transformation-iii

Bit Manipulation

0078-subsets
0090-subsets-ii
1220-smallest-sufficient-team
1360-maximum-length-of-a-concatenated-string-with-unique-characters
1418-fair-distribution-of-cookies
1435-xor-queries-of-a-subarray
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
2356-largest-combination-with-bitwise-and-greater-than-zero
2503-longest-subarray-with-maximum-bitwise-and
3291-find-if-array-can-be-sorted
3348-minimum-cost-walk-in-weighted-graph
3380-shortest-subarray-with-or-at-least-k-ii
3394-minimum-array-end
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

Prefix Sum

0892-shortest-subarray-with-sum-at-least-k
0966-binary-subarrays-with-sum
1240-stone-game-ii
1393-maximum-value-of-k-coins-from-piles
1435-xor-queries-of-a-subarray
1477-product-of-the-last-k-numbers
1537-maximum-score-after-splitting-a-string
1694-make-sum-divisible-by-p
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1940-maximum-xor-for-each-query
2059-unique-length-3-palindromic-subsequences
2249-count-the-hidden-sequences
2358-number-of-ways-to-split-array
2394-count-subarrays-with-score-less-than-k
2465-shifting-letters-ii
2488-divide-intervals-into-minimum-number-of-groups
2691-count-vowel-strings-in-ranges
3427-special-array-ii
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3647-zero-array-transformation-iii

Linked List

0024-swap-nodes-in-pairs
0109-convert-sorted-list-to-binary-search-tree
0432-all-oone-data-structure
0859-design-circular-deque
1484-linked-list-in-binary-tree

Tree

0109-convert-sorted-list-to-binary-search-tree
0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0501-find-mode-in-binary-search-tree
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0563-binary-tree-tilt
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0863-sum-of-distances-in-tree
0988-flip-equivalent-binary-trees
1008-binary-tree-cameras
1218-lowest-common-ancestor-of-deepest-leaves
1254-deepest-leaves-sum
1484-linked-list-in-binary-tree
1554-minimum-time-to-collect-all-apples-in-a-tree
1643-number-of-nodes-in-the-sub-tree-with-the-same-label
2347-count-nodes-equal-to-average-of-subtree
2364-longest-path-with-different-adjacent-characters
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2564-most-profitable-path-in-a-tree
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Depth-First Search

0079-word-search
0124-binary-tree-maximum-path-sum
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0332-reconstruct-itinerary
0386-lexicographical-numbers
0399-evaluate-division
0501-find-mode-in-binary-search-tree
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0547-number-of-provinces
0563-binary-tree-tilt
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0684-redundant-connection
0733-flood-fill
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0820-find-eventual-safe-states
0863-sum-of-distances-in-tree
0869-similar-string-groups
0871-keys-and-rooms
0922-possible-bipartition
0984-most-stones-removed-with-same-row-or-column
0988-flip-equivalent-binary-trees
1008-binary-tree-cameras
1218-lowest-common-ancestor-of-deepest-leaves
1254-deepest-leaves-sum
1484-linked-list-in-binary-tree
1554-minimum-time-to-collect-all-apples-in-a-tree
1643-number-of-nodes-in-the-sub-tree-with-the-same-label
1866-restore-the-array-from-adjacent-pairs
2121-find-if-path-exists-in-graph
2201-valid-arrangement-of-pairs
2206-detonate-the-maximum-bombs
2347-count-nodes-equal-to-average-of-subtree
2364-longest-path-with-different-adjacent-characters
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2409-number-of-increasing-paths-in-a-grid
2438-find-closest-node-to-given-two-nodes
2439-longest-cycle-in-a-graph
2493-reverse-odd-levels-of-binary-tree
2564-most-profitable-path-in-a-tree
2582-minimum-score-of-a-path-between-two-cities
2677-cousins-in-binary-tree-ii
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Binary Tree

0109-convert-sorted-list-to-binary-search-tree
0124-binary-tree-maximum-path-sum
0199-binary-tree-right-side-view
0501-find-mode-in-binary-search-tree
0515-find-largest-value-in-each-tree-row
0538-convert-bst-to-greater-tree
0563-binary-tree-tilt
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0988-flip-equivalent-binary-trees
1008-binary-tree-cameras
1218-lowest-common-ancestor-of-deepest-leaves
1254-deepest-leaves-sum
1484-linked-list-in-binary-tree
2347-count-nodes-equal-to-average-of-subtree
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Matrix

0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0079-word-search
0200-number-of-islands
0212-word-search-ii
0733-flood-fill
0787-sliding-puzzle
0945-snakes-and-ladders
0967-minimum-falling-path-sum
1147-flip-columns-for-maximum-number-of-equal-rows
1171-shortest-path-in-binary-matrix
1972-rotating-the-box
2038-nearest-exit-from-entrance-in-maze
2089-maximum-matrix-sum
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2409-number-of-increasing-paths-in-a-grid
2472-build-a-matrix-with-conditions
2588-maximum-number-of-points-from-grid-queries
2711-minimum-time-to-visit-a-cell-in-a-grid
2794-maximum-number-of-moves-in-a-grid
3227-find-missing-and-repeated-values
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and

Hash Table

0073-set-matrix-zeroes
0133-clone-graph
0432-all-oone-data-structure
0433-minimum-genetic-mutation
0442-find-all-duplicates-in-an-array
0594-longest-harmonious-subsequence
0632-smallest-range-covering-elements-from-k-lists
0648-replace-words
0768-partition-labels
0797-rabbits-in-forest
0833-bus-routes
0843-binary-trees-with-factors
0869-similar-string-groups
0905-length-of-longest-fibonacci-subsequence
0920-uncommon-words-from-two-sentences
0966-binary-subarrays-with-sum
0984-most-stones-removed-with-same-row-or-column
1147-flip-columns-for-maximum-number-of-equal-rows
1218-lowest-common-ancestor-of-deepest-leaves
1227-number-of-equivalent-domino-pairs
1500-count-largest-group
1554-minimum-time-to-collect-all-apples-in-a-tree
1620-check-if-array-pairs-are-divisible-by-k
1643-number-of-nodes-in-the-sub-tree-with-the-same-label
1694-make-sum-divisible-by-p
1715-split-a-string-into-the-max-number-of-unique-substrings
1866-restore-the-array-from-adjacent-pairs
1915-check-if-one-string-swap-can-make-strings-equal
1995-finding-pairs-with-a-certain-sum
2059-unique-length-3-palindromic-subsequences
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2434-design-a-number-container-system
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2552-maximum-sum-of-distinct-subarrays-with-length-k
2586-longest-square-streak-in-an-array
2599-take-k-of-each-character-from-left-and-right
2626-count-the-number-of-good-subarrays
2677-cousins-in-binary-tree-ii
2695-find-score-of-an-array-after-marking-all-elements
2707-merge-two-2d-arrays-by-summing-values
2755-extra-characters-in-a-string
2856-count-complete-subarrays-in-an-array
2888-minimum-index-of-a-valid-split
3227-find-missing-and-repeated-values
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3445-lexicographically-minimum-string-after-removing-stars
3548-find-the-count-of-good-integers
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

Counting

0594-longest-harmonious-subsequence
0920-uncommon-words-from-two-sentences
1227-number-of-equivalent-domino-pairs
1620-check-if-array-pairs-are-divisible-by-k
1643-number-of-nodes-in-the-sub-tree-with-the-same-label
1915-check-if-one-string-swap-can-make-strings-equal
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2494-sum-of-prefix-scores-of-strings
3267-find-longest-special-substring-that-occurs-thrice-i
3276-minimum-number-of-pushes-to-type-word-ii
3753-maximum-difference-between-even-and-odd-frequency-i

Math

0062-unique-paths
0070-climbing-stairs
0241-different-ways-to-add-parentheses
0279-perfect-squares
0368-largest-divisible-subset
0539-minimum-time-difference
0670-maximum-swap
0797-rabbits-in-forest
0909-stone-game
0956-number-of-music-playlists
1240-stone-game-ii
1421-find-numbers-with-even-number-of-digits
1477-product-of-the-last-k-numbers
1500-count-largest-group
1522-stone-game-iii
1529-max-difference-you-can-get-from-changing-an-integer
1993-sum-of-all-subset-xor-totals
2206-detonate-the-maximum-bombs
2415-count-the-number-of-ideal-arrays
2649-count-total-number-of-colored-cells
2704-maximum-difference-by-remapping-a-digit
2802-find-the-punishment-number-of-an-integer
2998-count-symmetric-integers
3227-find-missing-and-repeated-values
3243-count-the-number-of-powerful-integers
3548-find-the-count-of-good-integers
3555-final-array-state-after-k-multiplication-operations-i
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii
3831-find-x-value-of-array-i

Sorting

0295-find-median-from-data-stream
0368-largest-divisible-subset
0539-minimum-time-difference
0594-longest-harmonious-subsequence
0632-smallest-range-covering-elements-from-k-lists
0780-max-chunks-to-make-sorted
0843-binary-trees-with-factors
1352-maximum-profit-in-job-scheduling
1503-reducing-dishes
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1669-minimum-cost-to-cut-a-stick
1815-checking-existence-of-edge-length-limited-paths
1851-maximum-number-of-events-that-can-be-attended-ii
2164-two-best-non-overlapping-events
2180-maximum-number-of-tasks-you-can-assign
2488-divide-intervals-into-minimum-number-of-groups
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2588-maximum-number-of-points-from-grid-queries
2646-kth-largest-sum-in-a-binary-tree
2681-put-marbles-in-bags
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2888-minimum-index-of-a-valid-split
2891-maximum-beauty-of-an-array-after-applying-operation
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted
3430-count-days-without-meetings
3647-zero-array-transformation-iii

Recursion

0024-swap-nodes-in-pairs
0241-different-ways-to-add-parentheses
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string
3600-find-the-k-th-character-in-string-game-i
3601-find-the-k-th-character-in-string-game-ii

Memoization

0070-climbing-stairs
0241-different-ways-to-add-parentheses
1680-count-all-possible-routes
2409-number-of-increasing-paths-in-a-grid

Rolling Hash

0214-shortest-palindrome
3309-count-prefix-and-suffix-pairs-i

String Matching

0214-shortest-palindrome
0812-rotate-string
1524-string-matching-in-an-array
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
3309-count-prefix-and-suffix-pairs-i

Hash Function

0214-shortest-palindrome
3309-count-prefix-and-suffix-pairs-i

Breadth-First Search

0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0279-perfect-squares
0322-coin-change
0399-evaluate-division
0433-minimum-genetic-mutation
0515-find-largest-value-in-each-tree-row
0547-number-of-provinces
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0684-redundant-connection
0733-flood-fill
0787-sliding-puzzle
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0820-find-eventual-safe-states
0833-bus-routes
0869-similar-string-groups
0871-keys-and-rooms
0922-possible-bipartition
0945-snakes-and-ladders
1171-shortest-path-in-binary-matrix
1218-lowest-common-ancestor-of-deepest-leaves
1254-deepest-leaves-sum
1554-minimum-time-to-collect-all-apples-in-a-tree
1643-number-of-nodes-in-the-sub-tree-with-the-same-label
2038-nearest-exit-from-entrance-in-maze
2121-find-if-path-exists-in-graph
2206-detonate-the-maximum-bombs
2375-minimum-obstacle-removal-to-reach-corner
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2409-number-of-increasing-paths-in-a-grid
2493-reverse-odd-levels-of-binary-tree
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2564-most-profitable-path-in-a-tree
2582-minimum-score-of-a-path-between-two-cities
2588-maximum-number-of-points-from-grid-queries
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
2711-minimum-time-to-visit-a-cell-in-a-grid
3439-find-minimum-diameter-after-merging-two-trees
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i

Union Find

0200-number-of-islands
0399-evaluate-division
0547-number-of-provinces
0684-redundant-connection
0801-is-graph-bipartite
0869-similar-string-groups
0922-possible-bipartition
0984-most-stones-removed-with-same-row-or-column
1032-satisfiability-of-equality-equations
1058-lexicographically-smallest-equivalent-string
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
1815-checking-existence-of-edge-length-limited-paths
2121-find-if-path-exists-in-graph
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2582-minimum-score-of-a-path-between-two-cities
2588-maximum-number-of-points-from-grid-queries
3348-minimum-cost-walk-in-weighted-graph

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0332-reconstruct-itinerary
0399-evaluate-division
0547-number-of-provinces
0684-redundant-connection
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0820-find-eventual-safe-states
0863-sum-of-distances-in-tree
0871-keys-and-rooms
0922-possible-bipartition
0984-most-stones-removed-with-same-row-or-column
1032-satisfiability-of-equality-equations
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1661-minimum-number-of-vertices-to-reach-all-nodes
1701-remove-max-number-of-edges-to-keep-graph-fully-traversable
1738-maximal-network-rank
1815-checking-existence-of-edge-length-limited-paths
1916-find-center-of-star-graph
2090-number-of-ways-to-arrive-at-destination
2121-find-if-path-exists-in-graph
2176-parallel-courses-iii
2201-valid-arrangement-of-pairs
2206-detonate-the-maximum-bombs
2364-longest-path-with-different-adjacent-characters
2375-minimum-obstacle-removal-to-reach-corner
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2409-number-of-increasing-paths-in-a-grid
2438-find-closest-node-to-given-two-nodes
2439-longest-cycle-in-a-graph
2472-build-a-matrix-with-conditions
2564-most-profitable-path-in-a-tree
2582-minimum-score-of-a-path-between-two-cities
2678-design-graph-with-shortest-path-calculator
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
3189-find-champion-ii
3348-minimum-cost-walk-in-weighted-graph
3439-find-minimum-diameter-after-merging-two-trees
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
2090-number-of-ways-to-arrive-at-destination
2176-parallel-courses-iii
2364-longest-path-with-different-adjacent-characters
2409-number-of-increasing-paths-in-a-grid
2439-longest-cycle-in-a-graph
2472-build-a-matrix-with-conditions

Binary Search

0300-longest-increasing-subsequence
0729-my-calendar-i
0892-shortest-subarray-with-sum-at-least-k
0907-koko-eating-bananas
1352-maximum-profit-in-job-scheduling
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1851-maximum-number-of-events-that-can-be-attended-ii
2096-find-the-longest-valid-obstacle-course-at-each-position
2164-two-best-non-overlapping-events
2180-maximum-number-of-tasks-you-can-assign
2188-minimized-maximum-of-products-distributed-to-any-store
2280-count-good-triplets-in-an-array
2394-count-subarrays-with-score-less-than-k
2586-longest-square-streak-in-an-array
2591-frog-jump-ii
2665-minimum-time-to-repair-cars
2699-count-the-number-of-fair-pairs
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3267-find-longest-special-substring-that-occurs-thrice-i
3427-special-array-ii

Binary Indexed Tree

2096-find-the-longest-valid-obstacle-course-at-each-position
2280-count-good-triplets-in-an-array
3181-find-building-where-alice-and-bob-can-meet

Trie

0212-word-search-ii
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
0648-replace-words
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix

Game Theory

0909-stone-game
1240-stone-game-ii
1522-stone-game-iii

Design

0295-find-median-from-data-stream
0432-all-oone-data-structure
0729-my-calendar-i
0859-design-circular-deque
1477-product-of-the-last-k-numbers
1995-finding-pairs-with-a-certain-sum
2434-design-a-number-container-system
2678-design-graph-with-shortest-path-calculator

Segment Tree

0729-my-calendar-i
2280-count-good-triplets-in-an-array
3181-find-building-where-alice-and-bob-can-meet

Ordered Set

0729-my-calendar-i
2280-count-good-triplets-in-an-array
2434-design-a-number-container-system
2868-continuous-subarrays

Backtracking

0040-combination-sum-ii
0078-subsets
0079-word-search
0090-subsets-ii
0212-word-search-ii
0494-target-sum
0813-all-paths-from-source-to-target
1360-maximum-length-of-a-concatenated-string-with-unique-characters
1418-fair-distribution-of-cookies
1715-split-a-string-into-the-max-number-of-unique-substrings
1819-construct-the-lexicographically-largest-valid-sequence
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2802-find-the-punishment-number-of-an-integer

Queue

0859-design-circular-deque
0892-shortest-subarray-with-sum-at-least-k
2180-maximum-number-of-tasks-you-can-assign
2868-continuous-subarrays
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Doubly-Linked List

0432-all-oone-data-structure

Two Pointers

0005-longest-palindromic-substring
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0295-find-median-from-data-stream
0768-partition-labels
0868-push-dominoes
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1815-checking-existence-of-edge-length-limited-paths
1923-sentence-similarity-iii
1972-rotating-the-box
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2265-partition-array-according-to-given-pivot
2320-find-all-k-distant-indices-in-an-array
2488-divide-intervals-into-minimum-number-of-groups
2551-apply-operations-to-an-array
2588-maximum-number-of-points-from-grid-queries
2699-count-the-number-of-fair-pairs
2707-merge-two-2d-arrays-by-summing-values
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

Heap (Priority Queue)

0295-find-median-from-data-stream
0632-smallest-range-covering-elements-from-k-lists
0892-shortest-subarray-with-sum-at-least-k
0902-minimum-number-of-refueling-stops
1304-longest-happy-string
1917-maximum-average-pass-ratio
2164-two-best-non-overlapping-events
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2434-design-a-number-container-system
2488-divide-intervals-into-minimum-number-of-groups
2588-maximum-number-of-points-from-grid-queries
2616-maximal-score-after-applying-k-operations
2678-design-graph-with-shortest-path-calculator
2681-put-marbles-in-bags
2695-find-score-of-an-array-after-marking-all-elements
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
2868-continuous-subarrays
3181-find-building-where-alice-and-bob-can-meet
3332-minimum-operations-to-exceed-threshold-value-ii
3445-lexicographically-minimum-string-after-removing-stars
3555-final-array-state-after-k-multiplication-operations-i
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii
3647-zero-array-transformation-iii

Enumeration

1656-count-good-triplets
1993-sum-of-all-subset-xor-totals
2170-count-number-of-maximum-bitwise-or-subsets
2998-count-symmetric-integers
3548-find-the-count-of-good-integers

Shortest Path

0399-evaluate-division
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2090-number-of-ways-to-arrive-at-destination
2375-minimum-obstacle-removal-to-reach-corner
2678-design-graph-with-shortest-path-calculator
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
3627-find-minimum-time-to-reach-last-room-i
3628-find-minimum-time-to-reach-last-room-ii

Geometry

2206-detonate-the-maximum-bombs

Binary Search Tree

0109-convert-sorted-list-to-binary-search-tree
0501-find-mode-in-binary-search-tree
0538-convert-bst-to-greater-tree

Sliding Window

0594-longest-harmonious-subsequence
0632-smallest-range-covering-elements-from-k-lists
0892-shortest-subarray-with-sum-at-least-k
0966-binary-subarrays-with-sum
1755-defuse-the-bomb
2394-count-subarrays-with-score-less-than-k
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
2626-count-the-number-of-good-subarrays
2856-count-complete-subarrays-in-an-array
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3267-find-longest-special-substring-that-occurs-thrice-i
3380-shortest-subarray-with-or-at-least-k-ii
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3522-find-the-power-of-k-size-subarrays-i

Divide and Conquer

0109-convert-sorted-list-to-binary-search-tree
2280-count-good-triplets-in-an-array

Monotonic Stack

0780-max-chunks-to-make-sorted
1570-final-prices-with-a-special-discount-in-a-shop
1679-shortest-subarray-to-be-removed-to-make-array-sorted
3181-find-building-where-alice-and-bob-can-meet

Monotonic Queue

0892-shortest-subarray-with-sum-at-least-k
2180-maximum-number-of-tasks-you-can-assign
2868-continuous-subarrays

Eulerian Circuit

0332-reconstruct-itinerary
2201-valid-arrangement-of-pairs

Data Stream

0295-find-median-from-data-stream
1477-product-of-the-last-k-numbers

Combinatorics

0062-unique-paths
0956-number-of-music-playlists
1993-sum-of-all-subset-xor-totals
2415-count-the-number-of-ideal-arrays
3548-find-the-count-of-good-integers

Bitmask

1220-smallest-sufficient-team
1418-fair-distribution-of-cookies

Merge Sort

2280-count-good-triplets-in-an-array

Number Theory

2415-count-the-number-of-ideal-arrays

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published