Skip to content

Sahilll15/DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA

Collection of LeetCode questions to ace the coding interview! - Created using LeetHub

Hash Table

0049-group-anagrams
0128-longest-consecutive-sequence
0347-top-k-frequent-elements
0424-longest-repeating-character-replacement
0653-two-sum-iv-input-is-a-bst
0876-hand-of-straights
0966-binary-subarrays-with-sum
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters

String

0067-add-binary
0257-binary-tree-paths
0424-longest-repeating-character-replacement
1460-number-of-substrings-containing-all-three-characters

Sliding Window

0424-longest-repeating-character-replacement
0658-find-k-closest-elements
0966-binary-subarrays-with-sum
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1755-defuse-the-bomb

Array

0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0049-group-anagrams
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0128-longest-consecutive-sequence
0167-two-sum-ii-input-array-is-sorted
0215-kth-largest-element-in-an-array
0238-product-of-array-except-self
0347-top-k-frequent-elements
0455-assign-cookies
0658-find-k-closest-elements
0733-flood-fill
0739-daily-temperatures
0792-binary-search
0876-hand-of-straights
0966-binary-subarrays-with-sum
1014-k-closest-points-to-origin
1036-rotting-oranges
1370-count-number-of-nice-subarrays
1574-maximum-product-of-two-elements-in-an-array
1755-defuse-the-bomb

Prefix Sum

0238-product-of-array-except-self
0966-binary-subarrays-with-sum

Math

0067-add-binary
1014-k-closest-points-to-origin
1370-count-number-of-nice-subarrays

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0739-daily-temperatures
0933-increasing-order-search-tree

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0671-second-minimum-node-in-a-binary-tree
0783-search-in-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0799-minimum-distance-between-bst-nodes
0933-increasing-order-search-tree
1005-univalued-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree

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
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0547-number-of-provinces
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0671-second-minimum-node-in-a-binary-tree
0733-flood-fill
0799-minimum-distance-between-bst-nodes
0933-increasing-order-search-tree
1005-univalued-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0404-sum-of-left-leaves
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0563-binary-tree-tilt
0572-subtree-of-another-tree
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0671-second-minimum-node-in-a-binary-tree
0783-search-in-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0799-minimum-distance-between-bst-nodes
0933-increasing-order-search-tree
1005-univalued-binary-tree
1035-cousins-in-binary-tree
1079-sum-of-root-to-leaf-binary-numbers
1114-binary-search-tree-to-greater-sum-tree
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree
2347-count-nodes-equal-to-average-of-subtree
2416-evaluate-boolean-binary-tree

Bit Manipulation

0067-add-binary
0222-count-complete-tree-nodes

Simulation

0067-add-binary

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0199-binary-tree-right-side-view
0404-sum-of-left-leaves
0530-minimum-absolute-difference-in-bst
0547-number-of-provinces
0617-merge-two-binary-trees
0637-average-of-levels-in-binary-tree
0653-two-sum-iv-input-is-a-bst
0662-maximum-width-of-binary-tree
0733-flood-fill
0799-minimum-distance-between-bst-nodes
1005-univalued-binary-tree
1035-cousins-in-binary-tree
1036-rotting-oranges
1254-deepest-leaves-sum
1498-find-a-corresponding-node-of-a-binary-tree-in-a-clone-of-that-tree

Binary Search

0004-median-of-two-sorted-arrays

Divide and Conquer

0004-median-of-two-sorted-arrays
0108-convert-sorted-array-to-binary-search-tree
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
1014-k-closest-points-to-origin

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0167-two-sum-ii-input-array-is-sorted
0222-count-complete-tree-nodes
0230-kth-smallest-element-in-a-bst
0501-find-mode-in-binary-search-tree
0530-minimum-absolute-difference-in-bst
0653-two-sum-iv-input-is-a-bst
0658-find-k-closest-elements
0783-search-in-a-binary-search-tree
0789-kth-largest-element-in-a-stream
0792-binary-search
0799-minimum-distance-between-bst-nodes
0933-increasing-order-search-tree
1114-binary-search-tree-to-greater-sum-tree

Backtracking

0257-binary-tree-paths

Two Pointers

0011-container-with-most-water
0015-3sum
0125-valid-palindrome
0167-two-sum-ii-input-array-is-sorted
0455-assign-cookies
0653-two-sum-iv-input-is-a-bst
0658-find-k-closest-elements

String Matching

0020-valid-parentheses
0049-group-anagrams
0125-valid-palindrome
0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Dynamic Programming

0118-pascals-triangle

Sorting

0015-3sum
0049-group-anagrams
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0455-assign-cookies
0658-find-k-closest-elements
0876-hand-of-straights
1014-k-closest-points-to-origin
1574-maximum-product-of-two-elements-in-an-array

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0658-find-k-closest-elements
0789-kth-largest-element-in-a-stream
1014-k-closest-points-to-origin
1574-maximum-product-of-two-elements-in-an-array

Quickselect

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

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements

Geometry

1014-k-closest-points-to-origin

Design

0789-kth-largest-element-in-a-stream

Data Stream

0789-kth-largest-element-in-a-stream

Greedy

0011-container-with-most-water
0455-assign-cookies
0876-hand-of-straights

Union Find

0128-longest-consecutive-sequence
0547-number-of-provinces

Graph

0547-number-of-provinces

Matrix

0733-flood-fill
1036-rotting-oranges

Monotonic Stack

0739-daily-temperatures

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0016-3sum-closest
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0040-combination-sum-ii
0049-group-anagrams
0055-jump-game
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0090-subsets-ii
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0179-largest-number
0200-number-of-islands
0209-minimum-size-subarray-sum
0217-contains-duplicate
0238-product-of-array-except-self
0239-sliding-window-maximum
0260-single-number-iii
0283-move-zeroes
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0380-insert-delete-getrandom-o1
0442-find-all-duplicates-in-an-array
0539-minimum-time-difference
0624-maximum-distance-in-arrays
0695-max-area-of-island
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0792-binary-search
0859-design-circular-deque
0870-magic-squares-in-grid
0883-car-fleet
0890-lemonade-change
0906-walking-robot-simulation
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1019-squares-of-a-sorted-array
1073-number-of-enclaves
1196-filling-bookcase-shelves
1240-stone-game-ii
1293-three-consecutive-odds
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
1435-xor-queries-of-a-subarray
1476-count-negative-numbers-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1497-design-a-stack-with-increment-operation
1511-count-number-of-teams
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1677-matrix-diagonal-sum
1691-minimum-number-of-days-to-disconnect-island
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2067-maximum-number-of-points-with-cost
2116-count-number-of-pairs-with-absolute-difference-k
2122-count-special-quadruplets
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2195-time-needed-to-buy-tickets
2255-minimum-swaps-to-group-all-1s-together-ii
2411-spiral-matrix-iv
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2524-largest-positive-integer-that-exists-with-its-negative
2634-minimum-common-value
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2847-find-maximum-number-of-string-pairs
3242-count-elements-with-maximum-frequency
3329-find-the-length-of-the-longest-common-prefix
3469-maximum-height-of-a-triangle
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3501-delete-nodes-from-linked-list-present-in-array

Stack

0020-valid-parentheses
0143-reorder-list
0145-binary-tree-postorder-traversal
0776-n-ary-tree-postorder-traversal
0883-car-fleet
1128-remove-all-adjacent-duplicates-in-string
1298-reverse-substrings-between-each-pair-of-parentheses
1320-remove-all-adjacent-duplicates-in-string-ii
1497-design-a-stack-with-increment-operation
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced

Sorting

0015-3sum
0016-3sum-closest
0049-group-anagrams
0075-sort-colors
0088-merge-sorted-array
0179-largest-number
0217-contains-duplicate
0242-valid-anagram
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0539-minimum-time-difference
0719-find-k-th-smallest-pair-distance
0883-car-fleet
1019-squares-of-a-sorted-array
1333-sort-the-jumbled-numbers
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1741-sort-array-by-increasing-frequency
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
3276-minimum-number-of-pushes-to-type-word-ii

Monotonic Stack

0883-car-fleet

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0792-binary-search
1476-count-negative-numbers-in-a-sorted-matrix
1615-range-sum-of-sorted-subarray-sums
2006-find-the-student-that-will-replace-the-chalk
2634-minimum-common-value

Matrix

0073-set-matrix-zeroes
0074-search-a-2d-matrix
0130-surrounded-regions
0200-number-of-islands
0695-max-area-of-island
0870-magic-squares-in-grid
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1073-number-of-enclaves
1476-count-negative-numbers-in-a-sorted-matrix
1496-lucky-numbers-in-a-matrix
1677-matrix-diagonal-sum
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2411-spiral-matrix-iv

Divide and Conquer

0004-median-of-two-sorted-arrays
0347-top-k-frequent-elements

Dynamic Programming

0005-longest-palindromic-substring
0055-jump-game
0121-best-time-to-buy-and-sell-stock
0264-ugly-number-ii
0650-2-keys-keyboard
1013-fibonacci-number
1196-filling-bookcase-shelves
1240-stone-game-ii
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
1511-count-number-of-teams
1756-minimum-deletions-to-make-string-balanced
2067-maximum-number-of-points-with-cost
2755-extra-characters-in-a-string

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0217-contains-duplicate
0242-valid-anagram
0264-ugly-number-ii
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0380-insert-delete-getrandom-o1
0424-longest-repeating-character-replacement
0442-find-all-duplicates-in-an-array
0567-permutation-in-string
0870-magic-squares-in-grid
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1473-find-the-longest-substring-containing-vowels-in-even-counts
1556-make-two-arrays-equal-by-reversing-subarrays
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2116-count-number-of-pairs-with-absolute-difference-k
2122-count-special-quadruplets
2163-kth-distinct-string-in-an-array
2502-sort-the-people
2524-largest-positive-integer-that-exists-with-its-negative
2634-minimum-common-value
2755-extra-characters-in-a-string
2847-find-maximum-number-of-string-pairs
3242-count-elements-with-maximum-frequency
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3501-delete-nodes-from-linked-list-present-in-array

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0049-group-anagrams
0076-minimum-window-substring
0125-valid-palindrome
0179-largest-number
0214-shortest-palindrome
0242-valid-anagram
0273-integer-to-english-words
0424-longest-repeating-character-replacement
0539-minimum-time-difference
0564-find-the-closest-palindrome
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0920-uncommon-words-from-two-sentences
1128-remove-all-adjacent-duplicates-in-string
1298-reverse-substrings-between-each-pair-of-parentheses
1320-remove-all-adjacent-duplicates-in-string-ii
1473-find-the-longest-substring-containing-vowels-in-even-counts
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1850-minimum-length-of-string-after-deleting-similar-ends
2076-sum-of-digits-of-string-after-convert
2128-reverse-prefix-of-word
2163-kth-distinct-string-in-an-array
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2847-find-maximum-number-of-string-pairs
3275-minimum-number-of-pushes-to-type-word-i
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix

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
0567-permutation-in-string
2255-minimum-swaps-to-group-all-1s-together-ii

Depth-First Search

0130-surrounded-regions
0145-binary-tree-postorder-traversal
0200-number-of-islands
0386-lexicographical-numbers
0695-max-area-of-island
0776-n-ary-tree-postorder-traversal
0801-is-graph-bipartite
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1073-number-of-enclaves
1484-linked-list-in-binary-tree
1544-count-good-nodes-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands

Breadth-First Search

0130-surrounded-regions
0200-number-of-islands
0695-max-area-of-island
0801-is-graph-bipartite
0999-regions-cut-by-slashes
1073-number-of-enclaves
1484-linked-list-in-binary-tree
1544-count-good-nodes-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0695-max-area-of-island
0801-is-graph-bipartite
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1073-number-of-enclaves
2035-count-sub-islands

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0016-3sum-closest
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0088-merge-sorted-array
0125-valid-palindrome
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0283-move-zeroes
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0567-permutation-in-string
0719-find-k-th-smallest-pair-distance
1019-squares-of-a-sorted-array
1615-range-sum-of-sorted-subarray-sums
1850-minimum-length-of-string-after-deleting-similar-ends
2128-reverse-prefix-of-word
2524-largest-positive-integer-that-exists-with-its-negative
2634-minimum-common-value

Queue

0239-sliding-window-maximum
0859-design-circular-deque
1951-find-the-winner-of-the-circular-game
2195-time-needed-to-buy-tickets

Heap (Priority Queue)

0239-sliding-window-maximum
0264-ugly-number-ii
0347-top-k-frequent-elements
0789-kth-largest-element-in-a-stream
1325-path-with-maximum-probability
2803-modify-graph-edge-weights

Monotonic Queue

0239-sliding-window-maximum

Linked List

0002-add-two-numbers
0021-merge-two-sorted-lists
0138-copy-list-with-random-pointer
0143-reorder-list
0859-design-circular-deque
1484-linked-list-in-binary-tree
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0143-reorder-list
0273-integer-to-english-words
0326-power-of-three
1013-fibonacci-number
1951-find-the-winner-of-the-circular-game

Graph

0801-is-graph-bipartite
0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2803-modify-graph-edge-weights

Tree

0145-binary-tree-postorder-traversal
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1484-linked-list-in-binary-tree
1544-count-good-nodes-in-binary-tree

Binary Tree

0145-binary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
1484-linked-list-in-binary-tree
1544-count-good-nodes-in-binary-tree

Bit Manipulation

0078-subsets
0090-subsets-ii
0260-single-number-iii
0476-number-complement
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1786-count-the-number-of-consistent-strings
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and

Math

0002-add-two-numbers
0007-reverse-integer
0009-palindrome-number
0263-ugly-number
0264-ugly-number-ii
0273-integer-to-english-words
0326-power-of-three
0380-insert-delete-getrandom-o1
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0870-magic-squares-in-grid
1013-fibonacci-number
1240-stone-game-ii
1642-water-bottles
1889-check-if-number-is-a-sum-of-powers-of-three
1951-find-the-winner-of-the-circular-game
2155-find-missing-observations
2645-pass-the-pillow
2903-insert-greatest-common-divisors-in-linked-list
3275-minimum-number-of-pushes-to-type-word-i
3476-find-minimum-operations-to-make-all-elements-divisible-by-three

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0214-shortest-palindrome

Database

0196-delete-duplicate-emails
0577-employee-bonus
0584-find-customer-referee
0586-customer-placing-the-largest-number-of-orders
0595-big-countries
0610-triangle-judgement
0619-biggest-single-number
0620-not-boring-movies
0626-exchange-seats
1135-customers-who-bought-all-products
1153-product-sales-analysis-i
1155-product-sales-analysis-iii
1161-project-employees-i
1245-user-activity-for-the-past-30-days-i
1292-immediate-food-delivery-ii
1317-monthly-transactions-i
1338-queries-quality-and-percentage
1390-average-selling-price
1415-students-and-examinations
1462-list-the-products-ordered-in-a-period
1480-movie-rating
1509-replace-employee-id-with-the-unique-identifier
1625-group-sold-products-by-the-date
1664-find-users-with-valid-e-mails
1670-patients-with-a-condition
1724-customer-who-visited-but-did-not-make-any-transactions
1773-percentage-of-users-attended-a-contest
1811-fix-names-in-a-table
1827-invalid-tweets
1877-find-followers-count
1882-the-number-of-employees-which-report-to-each-employee
1942-primary-department-for-each-employee
2127-employees-whose-manager-left-the-company
2495-number-of-unique-subjects-taught-by-each-teacher

Greedy

0011-container-with-most-water
0055-jump-game
0134-gas-station
0179-largest-number
0624-maximum-distance-in-arrays
0890-lemonade-change
3275-minimum-number-of-pushes-to-type-word-i
3276-minimum-number-of-pushes-to-type-word-ii

Design

0380-insert-delete-getrandom-o1
0729-my-calendar-i
0731-my-calendar-ii
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
1497-design-a-stack-with-increment-operation

Randomized

0380-insert-delete-getrandom-o1

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0731-my-calendar-ii
1240-stone-game-ii
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
2006-find-the-student-that-will-replace-the-chalk

Simulation

0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
1642-water-bottles
1951-find-the-winner-of-the-circular-game
2006-find-the-student-that-will-replace-the-chalk
2076-sum-of-digits-of-string-after-convert
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2195-time-needed-to-buy-tickets
2411-spiral-matrix-iv
2645-pass-the-pillow
2847-find-maximum-number-of-string-pairs

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements
0920-uncommon-words-from-two-sentences
1786-count-the-number-of-consistent-strings
2116-count-number-of-pairs-with-absolute-difference-k
2163-kth-distinct-string-in-an-array
2494-sum-of-prefix-scores-of-strings
3242-count-elements-with-maximum-frequency
3276-minimum-number-of-pushes-to-type-word-ii

Quickselect

0347-top-k-frequent-elements

Shortest Path

1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2803-modify-graph-edge-weights

Binary Indexed Tree

1511-count-number-of-teams

Backtracking

0040-combination-sum-ii
0078-subsets
0090-subsets-ii

Memoization

1013-fibonacci-number

Enumeration

2122-count-special-quadruplets
3469-maximum-height-of-a-triangle

Strongly Connected Component

1691-minimum-number-of-days-to-disconnect-island

Binary Search Tree

0789-kth-largest-element-in-a-stream

Data Stream

0789-kth-largest-element-in-a-stream

Game Theory

1240-stone-game-ii

Number Theory

2903-insert-greatest-common-divisors-in-linked-list

Brainteaser

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

Rolling Hash

0214-shortest-palindrome

Hash Function

0214-shortest-palindrome

Trie

0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3329-find-the-length-of-the-longest-common-prefix

Segment Tree

0729-my-calendar-i
0731-my-calendar-ii

Ordered Set

0729-my-calendar-i
0731-my-calendar-ii

About

DSA PRACTICE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages