Skip to content

Welcome to my LeetCode Problems Repository! I solve and push new LeetCode problems every day.Whether you're a beginner or preparing for coding interviews, this repository offers organized solutions with step-by-step explanations and optimized approaches.Dont forget to fork and star this repository.😊

Notifications You must be signed in to change notification settings

HassanMehmood413/LeetCode_Problems_2024-July-

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

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
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
0240-search-a-2d-matrix-ii
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0367-valid-perfect-square
0378-kth-smallest-element-in-a-sorted-matrix
0493-reverse-pairs
0540-single-element-in-a-sorted-array
0633-sum-of-square-numbers
0745-find-smallest-letter-greater-than-target
0794-swim-in-rising-water
0907-koko-eating-bananas
1023-time-based-key-value-store
1046-max-consecutive-ones-iii
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1615-range-sum-of-sorted-subarray-sums
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2006-find-the-student-that-will-replace-the-chalk
2210-find-target-indices-after-sorting-array
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2530-minimize-maximum-of-array
2586-longest-square-streak-in-an-array
2614-maximum-count-of-positive-integer-and-negative-integer
2634-minimum-common-value
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
3181-find-building-where-alice-and-bob-can-meet

Bit Manipulation

0078-subsets
0090-subsets-ii
0190-reverse-bits
0222-count-complete-tree-nodes
0287-find-the-duplicate-number
0473-matchsticks-to-square
0476-number-complement
0698-partition-to-k-equal-sum-subsets
0861-flipping-an-image
1435-xor-queries-of-a-subarray
1786-count-the-number-of-consistent-strings
2059-unique-length-3-palindromic-subsequences
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and
2766-find-the-prefix-common-array-of-two-arrays
3044-minimum-operations-to-collect-elements
3093-sum-of-values-at-indices-with-k-set-bits
3291-find-if-array-can-be-sorted
3428-find-the-xor-of-numbers-which-appear-twice
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3508-number-of-bit-changes-to-make-two-integers-equal

Tree

0094-binary-tree-inorder-traversal
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
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-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
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
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0606-construct-string-from-binary-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0654-maximum-binary-tree
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
2384-root-equals-sum-of-children
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

Binary Tree

0094-binary-tree-inorder-traversal
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
0107-binary-tree-level-order-traversal-ii
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-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
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
0404-sum-of-left-leaves
0450-delete-node-in-a-bst
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0606-construct-string-from-binary-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0654-maximum-binary-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
2384-root-equals-sum-of-children
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

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0061-rotate-list
0086-partition-list
0109-convert-sorted-list-to-binary-search-tree
0114-flatten-binary-tree-to-linked-list
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0146-lru-cache
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0355-design-twitter
0382-linked-list-random-node
0460-lfu-cache
0725-split-linked-list-in-parts
0859-design-circular-deque
0908-middle-of-the-linked-list
1072-next-greater-node-in-linked-list
2236-maximum-twin-sum-of-a-linked-list
2299-merge-nodes-in-between-zeros
2573-remove-nodes-from-linked-list
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0033-search-in-rotated-sorted-array
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0045-jump-game-ii
0046-permutations
0047-permutations-ii
0048-rotate-image
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0055-jump-game
0056-merge-intervals
0057-insert-interval
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
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0130-surrounded-regions
0139-word-break
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0164-maximum-gap
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0221-maximal-square
0229-majority-element-ii
0238-product-of-array-except-self
0239-sliding-window-maximum
0240-search-a-2d-matrix-ii
0274-h-index
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0303-range-sum-query-immutable
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0334-increasing-triplet-subsequence
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0380-insert-delete-getrandom-o1
0384-shuffle-an-array
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0435-non-overlapping-intervals
0463-island-perimeter
0473-matchsticks-to-square
0485-max-consecutive-ones
0493-reverse-pairs
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
0542-01-matrix
0621-task-scheduler
0624-maximum-distance-in-arrays
0643-maximum-average-subarray-i
0654-maximum-binary-tree
0674-longest-continuous-increasing-subsequence
0682-baseball-game
0695-max-area-of-island
0698-partition-to-k-equal-sum-subsets
0713-subarray-product-less-than-k
0735-asteroid-collision
0739-daily-temperatures
0745-find-smallest-letter-greater-than-target
0747-min-cost-climbing-stairs
0748-largest-number-at-least-twice-of-others
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0794-swim-in-rising-water
0859-design-circular-deque
0861-flipping-an-image
0883-car-fleet
0890-lemonade-change
0898-transpose-matrix
0907-koko-eating-bananas
0948-sort-an-array
0952-word-subsets
0983-validate-stack-sequences
1014-k-closest-points-to-origin
1025-minimum-cost-for-tickets
1036-rotting-oranges
1046-max-consecutive-ones-iii
1047-maximize-sum-of-array-after-k-negations
1063-best-sightseeing-pair
1072-next-greater-node-in-linked-list
1127-last-stone-weight
1147-flip-columns-for-maximum-number-of-equal-rows
1210-mean-of-array-after-removing-some-elements
1231-replace-elements-with-greatest-element-on-right-side
1306-minimum-absolute-difference
1319-unique-number-of-occurrences
1350-remove-sub-folders-from-the-filesystem
1392-find-the-difference-of-two-arrays
1402-count-square-submatrices-with-all-ones
1435-xor-queries-of-a-subarray
1445-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1524-string-matching-in-an-array
1528-kids-with-the-greatest-number-of-candies
1538-maximum-points-you-can-obtain-from-cards
1556-make-two-arrays-equal-by-reversing-subarrays
1570-final-prices-with-a-special-discount-in-a-shop
1584-average-salary-excluding-the-minimum-and-maximum-salary
1586-longest-subarray-of-1s-after-deleting-one-element
1603-running-sum-of-1d-array
1604-least-number-of-unique-integers-after-k-removals
1615-range-sum-of-sorted-subarray-sums
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1706-min-cost-to-connect-all-points
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1798-max-number-of-k-sum-pairs
1833-find-the-highest-altitude
1950-sign-of-the-product-of-an-array
1972-rotating-the-box
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2042-maximum-product-difference-between-two-pairs
2058-concatenation-of-array
2102-find-the-middle-index-in-array
2106-find-greatest-common-divisor-of-array
2107-find-unique-binary-string
2116-count-number-of-pairs-with-absolute-difference-k
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2144-maximum-difference-between-increasing-elements
2148-minimum-number-of-moves-to-seat-everyone
2163-kth-distinct-string-in-an-array
2181-smallest-index-with-equal-value
2199-two-furthest-houses-with-different-colors
2210-find-target-indices-after-sorting-array
2219-maximum-number-of-words-found-in-sentences
2231-find-first-palindromic-string-in-the-array
2244-number-of-laser-beams-in-a-bank
2248-minimum-cost-of-buying-candies-with-discount
2254-check-if-every-row-and-column-contains-all-numbers
2255-minimum-swaps-to-group-all-1s-together-ii
2265-partition-array-according-to-given-pivot
2269-count-elements-with-strictly-smaller-and-greater-elements
2292-counting-words-with-a-given-prefix
2343-count-unguarded-cells-in-the-grid
2358-number-of-ways-to-split-array
2388-replace-elements-in-an-array
2392-successful-pairs-of-spells-and-potions
2394-count-subarrays-with-score-less-than-k
2428-equal-row-and-column-pairs
2480-find-subarrays-with-equal-sum
2486-most-frequent-even-element
2503-longest-subarray-with-maximum-bitwise-and
2524-largest-positive-integer-that-exists-with-its-negative
2525-count-number-of-distinct-integers-after-reverse-operations
2530-minimize-maximum-of-array
2552-maximum-sum-of-distinct-subarrays-with-length-k
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2585-delete-greatest-value-in-each-row
2586-longest-square-streak-in-an-array
2589-maximum-value-of-a-string-in-an-array
2614-maximum-count-of-positive-integer-and-negative-integer
2624-difference-between-element-sum-and-digit-sum-of-an-array
2631-sort-the-students-by-their-kth-score
2634-minimum-common-value
2639-separate-the-digits-in-an-array
2654-count-the-number-of-vowel-strings-in-range
2675-find-the-width-of-columns-of-a-grid
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2696-the-number-of-beautiful-subsets
2698-find-the-array-concatenation-value
2699-count-the-number-of-fair-pairs
2714-left-and-right-sum-differences
2724-convert-an-array-into-a-2d-array-with-conditions
2727-number-of-senior-citizens
2728-sum-in-a-matrix
2756-buy-two-chocolates
2766-find-the-prefix-common-array-of-two-arrays
2794-maximum-number-of-moves-in-a-grid
2836-neither-minimum-nor-maximum
2868-continuous-subarrays
2876-number-of-employees-who-met-the-target
2891-maximum-beauty-of-an-array-after-applying-operation
2917-count-pairs-whose-sum-is-less-than-target
3034-points-that-intersect-with-cars
3044-minimum-operations-to-collect-elements
3093-sum-of-values-at-indices-with-k-set-bits
3165-find-indices-with-index-and-value-difference-i
3181-find-building-where-alice-and-bob-can-meet
3194-find-words-containing-character
3206-find-common-elements-between-two-arrays
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3324-split-the-array
3347-distribute-elements-into-two-arrays-i
3373-maximum-prime-difference
3397-find-the-integer-added-to-array-i
3420-find-occurrences-of-an-element-in-an-array
3428-find-the-xor-of-numbers-which-appear-twice
3429-special-array-i
3446-find-the-number-of-good-pairs-i
3471-minimum-average-of-smallest-and-largest-elements
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3490-find-the-maximum-length-of-valid-subsequence-i
3501-delete-nodes-from-linked-list-present-in-array
3515-find-if-digit-game-can-be-won
3522-find-the-power-of-k-size-subarrays-i

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0037-sudoku-solver
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0127-word-ladder
0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0139-word-break
0141-linked-list-cycle
0142-linked-list-cycle-ii
0146-lru-cache
0160-intersection-of-two-linked-lists
0169-majority-element
0202-happy-number
0229-majority-element-ii
0242-valid-anagram
0347-top-k-frequent-elements
0355-design-twitter
0380-insert-delete-getrandom-o1
0398-random-pick-index
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0460-lfu-cache
0496-next-greater-element-i
0567-permutation-in-string
0621-task-scheduler
0768-partition-labels
0920-uncommon-words-from-two-sentences
0952-word-subsets
1023-time-based-key-value-store
1147-flip-columns-for-maximum-number-of-equal-rows
1319-unique-number-of-occurrences
1392-find-the-difference-of-two-arrays
1502-construct-k-palindrome-strings
1556-make-two-arrays-equal-by-reversing-subarrays
1604-least-number-of-unique-integers-after-k-removals
1715-split-a-string-into-the-max-number-of-unique-substrings
1741-sort-array-by-increasing-frequency
1746-largest-substring-between-two-equal-characters
1786-count-the-number-of-consistent-strings
1798-max-number-of-k-sum-pairs
1844-maximum-number-of-balls-in-a-box
1915-check-if-one-string-swap-can-make-strings-equal
1960-check-if-the-sentence-is-pangram
1987-substrings-of-size-three-with-distinct-characters
2053-check-if-all-characters-have-equal-number-of-occurrences
2059-unique-length-3-palindromic-subsequences
2107-find-unique-binary-string
2116-count-number-of-pairs-with-absolute-difference-k
2163-kth-distinct-string-in-an-array
2254-check-if-every-row-and-column-contains-all-numbers
2388-replace-elements-in-an-array
2428-equal-row-and-column-pairs
2480-find-subarrays-with-equal-sum
2486-most-frequent-even-element
2524-largest-positive-integer-that-exists-with-its-negative
2525-count-number-of-distinct-integers-after-reverse-operations
2552-maximum-sum-of-distinct-subarrays-with-length-k
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2634-minimum-common-value
2677-cousins-in-binary-tree-ii
2695-find-score-of-an-array-after-marking-all-elements
2696-the-number-of-beautiful-subsets
2724-convert-an-array-into-a-2d-array-with-conditions
2766-find-the-prefix-common-array-of-two-arrays
3034-points-that-intersect-with-cars
3044-minimum-operations-to-collect-elements
3206-find-common-elements-between-two-arrays
3276-minimum-number-of-pushes-to-type-word-ii
3324-split-the-array
3408-count-the-number-of-special-characters-i
3420-find-occurrences-of-an-element-in-an-array
3428-find-the-xor-of-numbers-which-appear-twice
3446-find-the-number-of-good-pairs-i
3501-delete-nodes-from-linked-list-present-in-array

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
0108-convert-sorted-array-to-binary-search-tree
0109-convert-sorted-list-to-binary-search-tree
0169-majority-element
0190-reverse-bits
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements
0493-reverse-pairs
0654-maximum-binary-tree
0948-sort-an-array
1014-k-closest-points-to-origin

Sorting

0015-3sum
0018-4sum
0049-group-anagrams
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0164-maximum-gap
0169-majority-element
0215-kth-largest-element-in-an-array
0229-majority-element-ii
0242-valid-anagram
0274-h-index
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0378-kth-smallest-element-in-a-sorted-matrix
0435-non-overlapping-intervals
0539-minimum-time-difference
0621-task-scheduler
0748-largest-number-at-least-twice-of-others
0780-max-chunks-to-make-sorted
0883-car-fleet
0948-sort-an-array
1014-k-closest-points-to-origin
1047-maximize-sum-of-array-after-k-negations
1210-mean-of-array-after-removing-some-elements
1306-minimum-absolute-difference
1463-the-k-weakest-rows-in-a-matrix
1556-make-two-arrays-equal-by-reversing-subarrays
1584-average-salary-excluding-the-minimum-and-maximum-salary
1604-least-number-of-unique-integers-after-k-removals
1615-range-sum-of-sorted-subarray-sums
1741-sort-array-by-increasing-frequency
1798-max-number-of-k-sum-pairs
2042-maximum-product-difference-between-two-pairs
2148-minimum-number-of-moves-to-seat-everyone
2210-find-target-indices-after-sorting-array
2248-minimum-cost-of-buying-candies-with-discount
2264-minimum-sum-of-four-digit-number-after-splitting-digits
2269-count-elements-with-strictly-smaller-and-greater-elements
2392-successful-pairs-of-spells-and-potions
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2566-number-of-unequal-triplets-in-array
2581-divide-players-into-teams-of-equal-skill
2585-delete-greatest-value-in-each-row
2586-longest-square-streak-in-an-array
2631-sort-the-students-by-their-kth-score
2646-kth-largest-sum-in-a-binary-tree
2695-find-score-of-an-array-after-marking-all-elements
2696-the-number-of-beautiful-subsets
2699-count-the-number-of-fair-pairs
2728-sum-in-a-matrix
2756-buy-two-chocolates
2836-neither-minimum-nor-maximum
2891-maximum-beauty-of-an-array-after-applying-operation
2917-count-pairs-whose-sum-is-less-than-target
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted
3471-minimum-average-of-smallest-and-largest-elements

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0355-design-twitter
0378-kth-smallest-element-in-a-sorted-matrix
0621-task-scheduler
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0794-swim-in-rising-water
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
2585-delete-greatest-value-in-each-row
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2728-sum-in-a-matrix
2868-continuous-subarrays
3181-find-building-where-alice-and-bob-can-meet

Bucket Sort

0164-maximum-gap
0347-top-k-frequent-elements
0948-sort-an-array

Counting

0169-majority-element
0229-majority-element-ii
0347-top-k-frequent-elements
0621-task-scheduler
0920-uncommon-words-from-two-sentences
1502-construct-k-palindrome-strings
1604-least-number-of-unique-integers-after-k-removals
1786-count-the-number-of-consistent-strings
1844-maximum-number-of-balls-in-a-box
1915-check-if-one-string-swap-can-make-strings-equal
1987-substrings-of-size-three-with-distinct-characters
2053-check-if-all-characters-have-equal-number-of-occurrences
2116-count-number-of-pairs-with-absolute-difference-k
2163-kth-distinct-string-in-an-array
2486-most-frequent-even-element
2614-maximum-count-of-positive-integer-and-negative-integer
2654-count-the-number-of-vowel-strings-in-range
3276-minimum-number-of-pushes-to-type-word-ii
3324-split-the-array

Quickselect

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

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0018-4sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0061-rotate-list
0075-sort-colors
0086-partition-list
0088-merge-sorted-array
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-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
0287-find-the-duplicate-number
0295-find-median-from-data-stream
0392-is-subsequence
0443-string-compression
0567-permutation-in-string
0633-sum-of-square-numbers
0768-partition-labels
0861-flipping-an-image
0874-backspace-string-compare
0908-middle-of-the-linked-list
1566-check-if-a-word-occurs-as-a-prefix-of-any-word-in-a-sentence
1615-range-sum-of-sorted-subarray-sums
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1798-max-number-of-k-sum-pairs
1972-rotating-the-box
2231-find-first-palindromic-string-in-the-array
2236-maximum-twin-sum-of-a-linked-list
2265-partition-array-according-to-given-pivot
2392-successful-pairs-of-spells-and-potions
2414-move-pieces-to-obtain-a-string
2524-largest-positive-integer-that-exists-with-its-negative
2561-number-of-distinct-averages
2581-divide-players-into-teams-of-equal-skill
2634-minimum-common-value
2698-find-the-array-concatenation-value
2699-count-the-number-of-fair-pairs
2917-count-pairs-whose-sum-is-less-than-target
3165-find-indices-with-index-and-value-difference-i
3195-separate-black-and-white-balls
3471-minimum-average-of-smallest-and-largest-elements

Math

0002-add-two-numbers
0007-reverse-integer
0048-rotate-image
0050-powx-n
0060-permutation-sequence
0062-unique-paths
0070-climbing-stairs
0172-factorial-trailing-zeroes
0202-happy-number
0357-count-numbers-with-unique-digits
0367-valid-perfect-square
0380-insert-delete-getrandom-o1
0382-linked-list-random-node
0384-shuffle-an-array
0398-random-pick-index
0412-fizz-buzz
0539-minimum-time-difference
0633-sum-of-square-numbers
0650-2-keys-keyboard
1013-fibonacci-number
1014-k-closest-points-to-origin
1236-n-th-tribonacci-number
1430-find-the-k-beauty-of-a-number
1806-count-of-matches-in-tournament
1844-maximum-number-of-balls-in-a-box
1950-sign-of-the-product-of-an-array
2106-find-greatest-common-divisor-of-array
2244-number-of-laser-beams-in-a-bank
2264-minimum-sum-of-four-digit-number-after-splitting-digits
2383-add-two-integers
2491-smallest-even-multiple
2525-count-number-of-distinct-integers-after-reverse-operations
2556-convert-the-temperature
2624-difference-between-element-sum-and-digit-sum-of-an-array
2696-the-number-of-beautiful-subsets
2903-insert-greatest-common-divisors-in-linked-list
3055-maximum-odd-binary-number
3373-maximum-prime-difference
3462-vowels-game-in-a-string
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3511-find-the-winning-player-in-coin-game
3515-find-if-digit-game-can-be-won

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0008-string-to-integer-atoi
0010-regular-expression-matching
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0071-simplify-path
0072-edit-distance
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0097-interleaving-string
0115-distinct-subsequences
0127-word-ladder
0131-palindrome-partitioning
0139-word-break
0151-reverse-words-in-a-string
0214-shortest-palindrome
0242-valid-anagram
0392-is-subsequence
0412-fizz-buzz
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0443-string-compression
0459-repeated-substring-pattern
0539-minimum-time-difference
0567-permutation-in-string
0606-construct-string-from-binary-tree
0768-partition-labels
0812-rotate-string
0874-backspace-string-compare
0920-uncommon-words-from-two-sentences
0952-word-subsets
1023-time-based-key-value-store
1250-longest-common-subsequence
1298-reverse-substrings-between-each-pair-of-parentheses
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1430-find-the-k-beauty-of-a-number
1502-construct-k-palindrome-strings
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
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1715-split-a-string-into-the-max-number-of-unique-substrings
1746-largest-substring-between-two-equal-characters
1786-count-the-number-of-consistent-strings
1915-check-if-one-string-swap-can-make-strings-equal
1960-check-if-the-sentence-is-pangram
1976-splitting-a-string-into-descending-consecutive-values
1987-substrings-of-size-three-with-distinct-characters
2053-check-if-all-characters-have-equal-number-of-occurrences
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2099-number-of-strings-that-appear-as-substrings-in-word
2107-find-unique-binary-string
2137-final-value-of-variable-after-performing-operations
2163-kth-distinct-string-in-an-array
2168-check-if-numbers-are-ascending-in-a-sentence
2219-maximum-number-of-words-found-in-sentences
2231-find-first-palindromic-string-in-the-array
2243-check-if-all-as-appears-before-all-bs
2244-number-of-laser-beams-in-a-bank
2292-counting-words-with-a-given-prefix
2414-move-pieces-to-obtain-a-string
2470-removing-stars-from-a-string
2580-circular-sentence
2589-maximum-value-of-a-string-in-an-array
2654-count-the-number-of-vowel-strings-in-range
2691-count-vowel-strings-in-ranges
2727-number-of-senior-citizens
2800-minimum-string-length-after-removing-substrings
2999-check-if-strings-can-be-made-equal-with-operations-i
3055-maximum-odd-binary-number
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3194-find-words-containing-character
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii
3309-count-prefix-and-suffix-pairs-i
3408-count-the-number-of-special-characters-i
3426-minimum-number-of-chairs-in-a-waiting-room
3451-string-compression-iii
3462-vowels-game-in-a-string
3468-find-the-encrypted-string

Design

0146-lru-cache
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0295-find-median-from-data-stream
0303-range-sum-query-immutable
0355-design-twitter
0380-insert-delete-getrandom-o1
0460-lfu-cache
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
0937-online-stock-span
1023-time-based-key-value-store

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0303-range-sum-query-immutable
1046-max-consecutive-ones-iii
1435-xor-queries-of-a-subarray
1537-maximum-score-after-splitting-a-string
1538-maximum-points-you-can-obtain-from-cards
1603-running-sum-of-1d-array
1833-find-the-highest-altitude
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2102-find-the-middle-index-in-array
2358-number-of-ways-to-split-array
2394-count-subarrays-with-score-less-than-k
2530-minimize-maximum-of-array
2691-count-vowel-strings-in-ranges
2714-left-and-right-sum-differences
3034-points-that-intersect-with-cars
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Dynamic Programming

0005-longest-palindromic-substring
0010-regular-expression-matching
0022-generate-parentheses
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0072-edit-distance
0091-decode-ways
0097-interleaving-string
0115-distinct-subsequences
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0131-palindrome-partitioning
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0221-maximal-square
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0357-count-numbers-with-unique-digits
0392-is-subsequence
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0473-matchsticks-to-square
0494-target-sum
0518-coin-change-ii
0542-01-matrix
0650-2-keys-keyboard
0698-partition-to-k-equal-sum-subsets
0747-min-cost-climbing-stairs
0803-cheapest-flights-within-k-stops
1013-fibonacci-number
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1236-n-th-tribonacci-number
1250-longest-common-subsequence
1402-count-square-submatrices-with-all-ones
1586-longest-subarray-of-1s-after-deleting-one-element
2530-minimize-maximum-of-array
2586-longest-square-streak-in-an-array
2696-the-number-of-beautiful-subsets
2794-maximum-number-of-moves-in-a-grid
3490-find-the-maximum-length-of-valid-subsequence-i

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0334-increasing-triplet-subsequence
0435-non-overlapping-intervals
0621-task-scheduler
0624-maximum-distance-in-arrays
0768-partition-labels
0780-max-chunks-to-make-sorted
0890-lemonade-change
1047-maximize-sum-of-array-after-k-negations
1502-construct-k-palindrome-strings
1604-least-number-of-unique-integers-after-k-removals
2148-minimum-number-of-moves-to-seat-everyone
2199-two-furthest-houses-with-different-colors
2248-minimum-cost-of-buying-candies-with-discount
2264-minimum-sum-of-four-digit-number-after-splitting-digits
2530-minimize-maximum-of-array
3055-maximum-odd-binary-number
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-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
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
0329-longest-increasing-path-in-a-matrix
0332-reconstruct-itinerary
0386-lexicographical-numbers
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
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
0606-construct-string-from-binary-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
0774-maximum-depth-of-n-ary-tree
0776-n-ary-tree-postorder-traversal
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
0904-leaf-similar-trees
0933-increasing-order-search-tree
0975-range-sum-of-bst
0988-flip-equivalent-binary-trees
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1350-remove-sub-folders-from-the-filesystem
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
2035-count-sub-islands
2493-reverse-odd-levels-of-binary-tree
2677-cousins-in-binary-tree-ii

Binary Search Tree

0098-validate-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
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0933-increasing-order-search-tree
0975-range-sum-of-bst

Simulation

0412-fizz-buzz
0682-baseball-game
0735-asteroid-collision
0861-flipping-an-image
0874-backspace-string-compare
0898-transpose-matrix
0983-validate-stack-sequences
1806-count-of-matches-in-tournament
2006-find-the-student-that-will-replace-the-chalk
2058-concatenation-of-array
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2137-final-value-of-variable-after-performing-operations
2265-partition-array-according-to-given-pivot
2299-merge-nodes-in-between-zeros
2343-count-unguarded-cells-in-the-grid
2388-replace-elements-in-an-array
2428-equal-row-and-column-pairs
2470-removing-stars-from-a-string
2585-delete-greatest-value-in-each-row
2639-separate-the-digits-in-an-array
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2698-find-the-array-concatenation-value
2728-sum-in-a-matrix
2800-minimum-string-length-after-removing-substrings
3347-distribute-elements-into-two-arrays-i
3426-minimum-number-of-chairs-in-a-waiting-room
3511-find-the-winning-player-in-coin-game

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and
3462-vowels-game-in-a-string

Game Theory

3462-vowels-game-in-a-string
3511-find-the-winning-player-in-coin-game

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
0127-word-ladder
0130-surrounded-regions
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0463-island-perimeter
0513-find-bottom-left-tree-value
0515-find-largest-value-in-each-tree-row
0542-01-matrix
0547-number-of-provinces
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0684-redundant-connection
0695-max-area-of-island
0744-network-delay-time
0764-n-ary-tree-level-order-traversal
0774-maximum-depth-of-n-ary-tree
0787-sliding-puzzle
0794-swim-in-rising-water
0803-cheapest-flights-within-k-stops
1036-rotting-oranges
1116-maximum-level-sum-of-a-binary-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
1544-count-good-nodes-in-binary-tree
2035-count-sub-islands
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

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0209-minimum-size-subarray-sum
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0567-permutation-in-string
0643-maximum-average-subarray-i
0713-subarray-product-less-than-k
1046-max-consecutive-ones-iii
1430-find-the-k-beauty-of-a-number
1445-number-of-sub-arrays-of-size-k-and-average-greater-than-or-equal-to-threshold
1538-maximum-points-you-can-obtain-from-cards
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1586-longest-subarray-of-1s-after-deleting-one-element
1987-substrings-of-size-three-with-distinct-characters
2255-minimum-swaps-to-group-all-1s-together-ii
2394-count-subarrays-with-score-less-than-k
2552-maximum-sum-of-distinct-subarrays-with-length-k
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i
3522-find-the-power-of-k-size-subarrays-i

Stack

0020-valid-parentheses
0071-simplify-path
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0143-reorder-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0496-next-greater-element-i
0503-next-greater-element-ii
0654-maximum-binary-tree
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0776-n-ary-tree-postorder-traversal
0780-max-chunks-to-make-sorted
0874-backspace-string-compare
0883-car-fleet
0933-increasing-order-search-tree
0937-online-stock-span
0983-validate-stack-sequences
1072-next-greater-node-in-linked-list
1298-reverse-substrings-between-each-pair-of-parentheses
1570-final-prices-with-a-special-discount-in-a-shop
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2236-maximum-twin-sum-of-a-linked-list
2470-removing-stars-from-a-string
2573-remove-nodes-from-linked-list
2800-minimum-string-length-after-removing-substrings
3181-find-building-where-alice-and-bob-can-meet

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0047-permutations-ii
0051-n-queens
0052-n-queens-ii
0077-combinations
0078-subsets
0079-word-search
0090-subsets-ii
0113-path-sum-ii
0131-palindrome-partitioning
0357-count-numbers-with-unique-digits
0473-matchsticks-to-square
0494-target-sum
0698-partition-to-k-equal-sum-subsets
1715-split-a-string-into-the-max-number-of-unique-substrings
1976-splitting-a-string-into-descending-consecutive-values
2107-find-unique-binary-string
2696-the-number-of-beautiful-subsets

Number Theory

2106-find-greatest-common-divisor-of-array
2491-smallest-even-multiple
2903-insert-greatest-common-divisors-in-linked-list
3373-maximum-prime-difference

Matrix

0037-sudoku-solver
0048-rotate-image
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0221-maximal-square
0240-search-a-2d-matrix-ii
0329-longest-increasing-path-in-a-matrix
0378-kth-smallest-element-in-a-sorted-matrix
0417-pacific-atlantic-water-flow
0463-island-perimeter
0542-01-matrix
0695-max-area-of-island
0787-sliding-puzzle
0794-swim-in-rising-water
0861-flipping-an-image
0898-transpose-matrix
1036-rotting-oranges
1147-flip-columns-for-maximum-number-of-equal-rows
1402-count-square-submatrices-with-all-ones
1463-the-k-weakest-rows-in-a-matrix
1476-count-negative-numbers-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1972-rotating-the-box
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2244-number-of-laser-beams-in-a-bank
2254-check-if-every-row-and-column-contains-all-numbers
2343-count-unguarded-cells-in-the-grid
2428-equal-row-and-column-pairs
2585-delete-greatest-value-in-each-row
2631-sort-the-students-by-their-kth-score
2675-find-the-width-of-columns-of-a-grid
2728-sum-in-a-matrix
2794-maximum-number-of-moves-in-a-grid

String Matching

0214-shortest-palindrome
0459-repeated-substring-pattern
0572-subtree-of-another-tree
0812-rotate-string
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

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0547-number-of-provinces
0684-redundant-connection
0695-max-area-of-island
0794-swim-in-rising-water
1706-min-cost-to-connect-all-points
2035-count-sub-islands

Monotonic Stack

0084-largest-rectangle-in-histogram
0496-next-greater-element-i
0503-next-greater-element-ii
0654-maximum-binary-tree
0739-daily-temperatures
0780-max-chunks-to-make-sorted
0883-car-fleet
0937-online-stock-span
1072-next-greater-node-in-linked-list
1570-final-prices-with-a-special-discount-in-a-shop
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2573-remove-nodes-from-linked-list
3181-find-building-where-alice-and-bob-can-meet

Radix Sort

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

Memoization

0070-climbing-stairs
0139-word-break
0329-longest-increasing-path-in-a-matrix
0698-partition-to-k-equal-sum-subsets
1013-fibonacci-number
1236-n-th-tribonacci-number

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0239-sliding-window-maximum
0859-design-circular-deque
2868-continuous-subarrays
3475-minimum-operations-to-make-binary-array-elements-equal-to-one-i

Monotonic Queue

0239-sliding-window-maximum
2868-continuous-subarrays

Reservoir Sampling

0382-linked-list-random-node
0398-random-pick-index

Randomized

0380-insert-delete-getrandom-o1
0382-linked-list-random-node
0384-shuffle-an-array
0398-random-pick-index

Counting Sort

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

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0050-powx-n
0060-permutation-sequence
0143-reorder-list
0206-reverse-linked-list
0234-palindrome-linked-list
1013-fibonacci-number
2573-remove-nodes-from-linked-list

Hash Function

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

Rolling Hash

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

Trie

0139-word-break
0386-lexicographical-numbers
1350-remove-sub-folders-from-the-filesystem
3309-count-prefix-and-suffix-pairs-i

Graph

0207-course-schedule
0210-course-schedule-ii
0329-longest-increasing-path-in-a-matrix
0332-reconstruct-itinerary
0547-number-of-provinces
0684-redundant-connection
0744-network-delay-time
0803-cheapest-flights-within-k-stops
1706-min-cost-to-connect-all-points
3189-find-champion-ii

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0329-longest-increasing-path-in-a-matrix

Minimum Spanning Tree

1706-min-cost-to-connect-all-points

Shortest Path

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

Merge Sort

0023-merge-k-sorted-lists
0493-reverse-pairs
0948-sort-an-array

Eulerian Circuit

0332-reconstruct-itinerary

Data Stream

0295-find-median-from-data-stream
0789-kth-largest-element-in-a-stream
0937-online-stock-span

Geometry

1014-k-closest-points-to-origin

Doubly-Linked List

0146-lru-cache
0460-lfu-cache

Bitmask

0473-matchsticks-to-square
0698-partition-to-k-equal-sum-subsets

Combinatorics

0062-unique-paths
2696-the-number-of-beautiful-subsets

Binary Indexed Tree

0493-reverse-pairs
3181-find-building-where-alice-and-bob-can-meet

Segment Tree

0493-reverse-pairs
3181-find-building-where-alice-and-bob-can-meet

Ordered Set

0493-reverse-pairs
2868-continuous-subarrays

About

Welcome to my LeetCode Problems Repository! I solve and push new LeetCode problems every day.Whether you're a beginner or preparing for coding interviews, this repository offers organized solutions with step-by-step explanations and optimized approaches.Dont forget to fork and star this repository.😊

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published