Skip to content

dhruvXcode247/DSA_Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSA_Problems

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0014-longest-common-prefix
0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0048-rotate-image
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0066-plus-one
0073-set-matrix-zeroes
0075-sort-colors
0078-subsets
0081-search-in-rotated-sorted-array-ii
0088-merge-sorted-array
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0135-candy
0136-single-number
0137-single-number-ii
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0198-house-robber
0209-minimum-size-subarray-sum
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0229-majority-element-ii
0238-product-of-array-except-self
0240-search-a-2d-matrix-ii
0260-single-number-iii
0268-missing-number
0283-move-zeroes
0287-find-the-duplicate-number
0322-coin-change
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0496-next-greater-element-i
0503-next-greater-element-ii
0540-single-element-in-a-sorted-array
0560-subarray-sum-equals-k
0717-1-bit-and-2-bit-characters
0724-find-pivot-index
0735-asteroid-collision
0745-find-smallest-letter-greater-than-target
0890-lemonade-change
0917-boats-to-save-people
0941-sort-array-by-parity
0944-delete-columns-to-make-sorted
0948-sort-an-array
0966-binary-subarrays-with-sum
1001-n-repeated-element-in-size-2n-array
1008-construct-binary-search-tree-from-preorder-traversal
1018-binary-prefix-divisible-by-5
1019-squares-of-a-sorted-array
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1047-maximize-sum-of-array-after-k-negations
1051-height-checker
1056-capacity-to-ship-packages-within-d-days
1127-last-stone-weight
1231-replace-elements-with-greatest-element-on-right-side
1319-unique-number-of-occurrences
1370-count-number-of-nice-subarrays
1408-find-the-smallest-divisor-given-a-threshold
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1482-how-many-numbers-are-smaller-than-the-current-number
1510-find-lucky-integer-in-an-array
1548-check-if-all-1s-are-at-least-length-k-places-away
1605-minimum-number-of-days-to-make-m-bouquets
1646-kth-missing-positive-number
1677-matrix-diagonal-sum
1700-minimum-time-to-make-rope-colorful
1769-minimum-number-of-operations-to-move-all-balls-to-each-box
1833-find-the-highest-altitude
1848-sum-of-unique-elements
1878-check-if-array-is-sorted-and-rotated
1938-minimum-operations-to-make-the-array-increasing
1951-find-the-winner-of-the-circular-game
1993-sum-of-all-subset-xor-totals
2058-concatenation-of-array
2106-find-greatest-common-divisor-of-array
2110-number-of-smooth-descent-periods-of-a-stock
2137-final-value-of-variable-after-performing-operations
2210-find-target-indices-after-sorting-array
2219-maximum-number-of-words-found-in-sentences
2227-sum-of-subarray-ranges
2254-check-if-every-row-and-column-contains-all-numbers
2269-count-elements-with-strictly-smaller-and-greater-elements
2271-rearrange-array-elements-by-sign
2274-keep-multiplying-found-values-by-two
2320-find-all-k-distant-indices-in-an-array
2324-find-triangular-sum-of-an-array
2331-intersection-of-multiple-arrays
2358-number-of-ways-to-split-array
2432-number-of-zero-filled-subarrays
2525-count-number-of-distinct-integers-after-reverse-operations
2624-difference-between-element-sum-and-digit-sum-of-an-array
2639-separate-the-digits-in-an-array
2654-count-the-number-of-vowel-strings-in-range
2676-find-the-score-of-all-prefixes-of-an-array
2684-determine-the-winner-of-a-bowling-game
2692-take-gifts-from-the-richest-pile
2694-find-the-maximum-divisibility-score
2712-find-the-maximum-number-of-marked-indices
2722-prime-in-diagonal
2728-sum-in-a-matrix
2737-row-with-maximum-ones
2767-maximum-sum-with-exactly-k-elements
2836-neither-minimum-nor-maximum
2845-find-the-value-of-the-partition
2847-find-maximum-number-of-string-pairs
2872-largest-element-in-an-array-after-merge-operations
2876-number-of-employees-who-met-the-target
2917-count-pairs-whose-sum-is-less-than-target
3165-find-indices-with-index-and-value-difference-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3193-maximum-strong-pair-xor-i
3194-find-words-containing-character
3206-find-common-elements-between-two-arrays
3221-find-the-peaks
3242-count-elements-with-maximum-frequency
3311-ant-on-the-boundary
3330-modify-the-matrix
3331-minimum-operations-to-exceed-threshold-value-i
3334-apple-redistribution-into-boxes
3355-minimum-levels-to-gain-more-points
3367-find-the-sum-of-encrypted-integers
3397-find-the-integer-added-to-array-i
3422-find-the-n-th-value-after-k-seconds
3432-count-partitions-with-even-sum-difference
3446-find-the-number-of-good-pairs-i
3471-minimum-average-of-smallest-and-largest-elements
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3501-delete-nodes-from-linked-list-present-in-array
3528-reach-end-of-array-with-max-score
3581-the-two-sneaky-numbers-of-digitville
3582-find-indices-of-stable-mountains
3606-minimum-element-after-replacement-with-digit-sum
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3778-transform-array-by-parity
3846-minimum-operations-to-make-array-sum-divisible-by-k
3869-smallest-index-with-digit-sum-equal-to-index

Two Pointers

0015-3sum
0018-4sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0042-trapping-rain-water
0075-sort-colors
0088-merge-sorted-array
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0165-compare-version-numbers
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0443-string-compression
0455-assign-cookies
0633-sum-of-square-numbers
0908-middle-of-the-linked-list
0917-boats-to-save-people
0941-sort-array-by-parity
1019-squares-of-a-sorted-array
2216-delete-the-middle-node-of-a-linked-list
2271-rearrange-array-elements-by-sign
2320-find-all-k-distant-indices-in-an-array
2481-strictly-palindromic-number
2712-find-the-maximum-number-of-marked-indices
2917-count-pairs-whose-sum-is-less-than-target
3165-find-indices-with-index-and-value-difference-i
3471-minimum-average-of-smallest-and-largest-elements

Sorting

0015-3sum
0018-4sum
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0148-sort-list
0169-majority-element
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0229-majority-element-ii
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0389-find-the-difference
0435-non-overlapping-intervals
0455-assign-cookies
0917-boats-to-save-people
0941-sort-array-by-parity
0948-sort-an-array
0987-vertical-order-traversal-of-a-binary-tree
1019-squares-of-a-sorted-array
1047-maximize-sum-of-array-after-k-negations
1051-height-checker
1482-how-many-numbers-are-smaller-than-the-current-number
2210-find-target-indices-after-sorting-array
2269-count-elements-with-strictly-smaller-and-greater-elements
2274-keep-multiplying-found-values-by-two
2331-intersection-of-multiple-arrays
2712-find-the-maximum-number-of-marked-indices
2728-sum-in-a-matrix
2836-neither-minimum-nor-maximum
2845-find-the-value-of-the-partition
2887-sort-vowels-in-a-string
2917-count-pairs-whose-sum-is-less-than-target
3334-apple-redistribution-into-boxes
3471-minimum-average-of-smallest-and-largest-elements
3778-transform-array-by-parity

Math

0002-add-two-numbers
0007-reverse-integer
0029-divide-two-integers
0048-rotate-image
0050-powx-n
0066-plus-one
0070-climbing-stairs
0171-excel-sheet-column-number
0189-rotate-array
0231-power-of-two
0268-missing-number
0319-bulb-switcher
0342-power-of-four
0367-valid-perfect-square
0507-perfect-number
0633-sum-of-square-numbers
1015-smallest-integer-divisible-by-k
1303-minimum-moves-to-reach-target-score
1370-count-number-of-nice-subarrays
1411-convert-binary-number-in-a-linked-list-to-integer
1421-find-numbers-with-even-number-of-digits
1426-find-n-unique-integers-sum-up-to-zero
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1444-number-of-steps-to-reduce-a-number-to-zero
1448-maximum-69-number
1523-count-odd-numbers-in-an-interval-range
1642-water-bottles
1817-calculate-money-in-leetcode-bank
1951-find-the-winner-of-the-circular-game
1965-sum-of-digits-in-base-k
1993-sum-of-all-subset-xor-totals
2032-largest-odd-number-in-string
2106-find-greatest-common-divisor-of-array
2110-number-of-smooth-descent-periods-of-a-stock
2288-count-operations-to-obtain-zero
2298-count-integers-with-even-digit-sum
2324-find-triangular-sum-of-an-array
2383-add-two-integers
2432-number-of-zero-filled-subarrays
2481-strictly-palindromic-number
2525-count-number-of-distinct-integers-after-reverse-operations
2608-count-the-digits-that-divide-a-number
2624-difference-between-element-sum-and-digit-sum-of-an-array
2649-count-total-number-of-colored-cells
2722-prime-in-diagonal
2824-check-if-the-number-is-fascinating
2864-maximum-odd-binary-number
3172-divisible-and-non-divisible-sums-difference
3367-find-the-sum-of-encrypted-integers
3371-harshad-number
3422-find-the-n-th-value-after-k-seconds
3432-count-partitions-with-even-sum-difference
3450-find-the-child-who-has-the-ball-after-k-seconds
3462-vowels-game-in-a-string
3476-find-minimum-operations-to-make-all-elements-divisible-by-three
3553-check-if-two-chessboard-squares-have-the-same-color
3581-the-two-sneaky-numbers-of-digitville
3606-minimum-element-after-replacement-with-digit-sum
3626-smallest-divisible-digit-product-i
3676-smallest-number-with-all-set-bits
3768-check-if-digits-are-equal-in-string-after-operations-i
3817-maximum-containers-on-a-ship
3830-find-closest-person
3846-minimum-operations-to-make-array-sum-divisible-by-k
3869-smallest-index-with-digit-sum-equal-to-index
3918-check-divisibility-by-digit-sum-and-product

Recursion

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

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0141-linked-list-cycle
0142-linked-list-cycle-ii
0146-lru-cache
0160-intersection-of-two-linked-lists
0169-majority-element
0217-contains-duplicate
0229-majority-element-ii
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0389-find-the-difference
0424-longest-repeating-character-replacement
0448-find-all-numbers-disappeared-in-an-array
0496-next-greater-element-i
0560-subarray-sum-equals-k
0782-jewels-and-stones
0863-all-nodes-distance-k-in-binary-tree
0966-binary-subarrays-with-sum
0987-vertical-order-traversal-of-a-binary-tree
1001-n-repeated-element-in-size-2n-array
1015-smallest-integer-divisible-by-k
1034-subarrays-with-k-different-integers
1264-maximum-number-of-words-you-can-type
1319-unique-number-of-occurrences
1370-count-number-of-nice-subarrays
1482-how-many-numbers-are-smaller-than-the-current-number
1510-find-lucky-integer-in-an-array
1848-sum-of-unique-elements
1960-check-if-the-sentence-is-pangram
2254-check-if-every-row-and-column-contains-all-numbers
2274-keep-multiplying-found-values-by-two
2331-intersection-of-multiple-arrays
2525-count-number-of-distinct-integers-after-reverse-operations
2824-check-if-the-number-is-fascinating
2847-find-maximum-number-of-string-pairs
3193-maximum-strong-pair-xor-i
3206-find-common-elements-between-two-arrays
3242-count-elements-with-maximum-frequency
3446-find-the-number-of-good-pairs-i
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3872-find-most-frequent-vowel-and-consonant

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0148-sort-list
0169-majority-element
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements
0948-sort-an-array

Counting

0169-majority-element
0229-majority-element-ii
0347-top-k-frequent-elements
1034-subarrays-with-k-different-integers
1510-find-lucky-integer-in-an-array
1848-sum-of-unique-elements
2269-count-elements-with-strictly-smaller-and-greater-elements
2331-intersection-of-multiple-arrays
2525-count-number-of-distinct-integers-after-reverse-operations
2654-count-the-number-of-vowel-strings-in-range
3019-furthest-point-from-origin
3242-count-elements-with-maximum-frequency
3778-transform-array-by-parity
3872-find-most-frequent-vowel-and-consonant

Dynamic Programming

0022-generate-parentheses
0042-trapping-rain-water
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0070-climbing-stairs
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0124-binary-tree-maximum-path-sum
0152-maximum-product-subarray
0198-house-robber
0322-coin-change
0338-counting-bits
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0678-valid-parenthesis-string
1700-minimum-time-to-make-rope-colorful
2110-number-of-smooth-descent-periods-of-a-stock

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
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
0268-missing-number
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0367-valid-perfect-square
0374-guess-number-higher-or-lower
0540-single-element-in-a-sorted-array
0633-sum-of-square-numbers
0745-find-smallest-letter-greater-than-target
1046-max-consecutive-ones-iii
1056-capacity-to-ship-packages-within-d-days
1408-find-the-smallest-divisor-given-a-threshold
1605-minimum-number-of-days-to-make-m-bouquets
1646-kth-missing-positive-number
2210-find-target-indices-after-sorting-array
2712-find-the-maximum-number-of-marked-indices
2917-count-pairs-whose-sum-is-less-than-target

Simulation

0054-spiral-matrix
0657-robot-return-to-origin
0735-asteroid-collision
1642-water-bottles
1951-find-the-winner-of-the-circular-game
2021-remove-all-occurrences-of-a-substring
2058-concatenation-of-array
2137-final-value-of-variable-after-performing-operations
2271-rearrange-array-elements-by-sign
2274-keep-multiplying-found-values-by-two
2288-count-operations-to-obtain-zero
2298-count-integers-with-even-digit-sum
2324-find-triangular-sum-of-an-array
2639-separate-the-digits-in-an-array
2684-determine-the-winner-of-a-bowling-game
2692-take-gifts-from-the-richest-pile
2728-sum-in-a-matrix
2847-find-maximum-number-of-string-pairs
3311-ant-on-the-boundary
3422-find-the-n-th-value-after-k-seconds
3426-minimum-number-of-chairs-in-a-waiting-room
3450-find-the-child-who-has-the-ball-after-k-seconds
3768-check-if-digits-are-equal-in-string-after-operations-i

Matrix

0048-rotate-image
0054-spiral-matrix
0073-set-matrix-zeroes
0240-search-a-2d-matrix-ii
1677-matrix-diagonal-sum
2254-check-if-every-row-and-column-contains-all-numbers
2722-prime-in-diagonal
2728-sum-in-a-matrix
2737-row-with-maximum-ones
3330-modify-the-matrix

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0024-swap-nodes-in-pairs
0083-remove-duplicates-from-sorted-list
0114-flatten-binary-tree-to-linked-list
0141-linked-list-cycle
0142-linked-list-cycle-ii
0146-lru-cache
0148-sort-list
0160-intersection-of-two-linked-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
2216-delete-the-middle-node-of-a-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0560-subarray-sum-equals-k
0724-find-pivot-index
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1769-minimum-number-of-operations-to-move-all-balls-to-each-box
1833-find-the-highest-altitude
2358-number-of-ways-to-split-array
2676-find-the-score-of-all-prefixes-of-an-array
3311-ant-on-the-boundary
3355-minimum-levels-to-gain-more-points
3422-find-the-n-th-value-after-k-seconds
3432-count-partitions-with-even-sum-difference

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0948-sort-an-array
1127-last-stone-weight
2692-take-gifts-from-the-richest-pile
2728-sum-in-a-matrix

Merge Sort

0148-sort-list
0948-sort-an-array

Bucket Sort

0347-top-k-frequent-elements
0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array
1051-height-checker
1482-how-many-numbers-are-smaller-than-the-current-number

Stack

0020-valid-parentheses
0042-trapping-rain-water
0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0173-binary-search-tree-iterator
0234-palindrome-linked-list
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0678-valid-parenthesis-string
0735-asteroid-collision
1008-construct-binary-search-tree-from-preorder-traversal
2021-remove-all-occurrences-of-a-substring
2227-sum-of-subarray-ranges

Memoization

0070-climbing-stairs

Backtracking

0022-generate-parentheses
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0078-subsets
0090-subsets-ii
1993-sum-of-all-subset-xor-totals

Bit Manipulation

0029-divide-two-integers
0078-subsets
0090-subsets-ii
0136-single-number
0137-single-number-ii
0191-number-of-1-bits
0222-count-complete-tree-nodes
0231-power-of-two
0260-single-number-iii
0268-missing-number
0287-find-the-duplicate-number
0338-counting-bits
0342-power-of-four
0389-find-the-difference
1018-binary-prefix-divisible-by-5
1444-number-of-steps-to-reduce-a-number-to-zero
1993-sum-of-all-subset-xor-totals
2323-minimum-bit-flips-to-convert-number
3193-maximum-strong-pair-xor-i
3676-smallest-number-with-all-set-bits

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
0199-binary-tree-right-side-view
0226-invert-binary-tree
0297-serialize-and-deserialize-binary-tree
0322-coin-change
0662-maximum-width-of-binary-tree
0863-all-nodes-distance-k-in-binary-tree
0987-vertical-order-traversal-of-a-binary-tree

String

0003-longest-substring-without-repeating-characters
0014-longest-common-prefix
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0058-length-of-last-word
0076-minimum-window-substring
0151-reverse-words-in-a-string
0165-compare-version-numbers
0171-excel-sheet-column-number
0297-serialize-and-deserialize-binary-tree
0389-find-the-difference
0402-remove-k-digits
0424-longest-repeating-character-replacement
0443-string-compression
0657-robot-return-to-origin
0678-valid-parenthesis-string
0782-jewels-and-stones
0812-rotate-string
0944-delete-columns-to-make-sorted
1205-defanging-an-ip-address
1264-maximum-number-of-words-you-can-type
1700-minimum-time-to-make-rope-colorful
1769-minimum-number-of-operations-to-move-all-balls-to-each-box
1960-check-if-the-sentence-is-pangram
2021-remove-all-occurrences-of-a-substring
2032-largest-odd-number-in-string
2137-final-value-of-variable-after-performing-operations
2219-maximum-number-of-words-found-in-sentences
2243-check-if-all-as-appears-before-all-bs
2654-count-the-number-of-vowel-strings-in-range
2847-find-maximum-number-of-string-pairs
2864-maximum-odd-binary-number
2887-sort-vowels-in-a-string
3019-furthest-point-from-origin
3194-find-words-containing-character
3379-score-of-a-string
3426-minimum-number-of-chairs-in-a-waiting-room
3462-vowels-game-in-a-string
3553-check-if-two-chessboard-squares-have-the-same-color
3636-check-balanced-string
3768-check-if-digits-are-equal-in-string-after-operations-i
3872-find-most-frequent-vowel-and-consonant

Design

0146-lru-cache
0155-min-stack
0173-binary-search-tree-iterator
0297-serialize-and-deserialize-binary-tree

Greedy

0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0135-candy
0402-remove-k-digits
0435-non-overlapping-intervals
0455-assign-cookies
0678-valid-parenthesis-string
0890-lemonade-change
0917-boats-to-save-people
1047-maximize-sum-of-array-after-k-negations
1303-minimum-moves-to-reach-target-score
1448-maximum-69-number
1700-minimum-time-to-make-rope-colorful
1938-minimum-operations-to-make-the-array-increasing
2032-largest-odd-number-in-string
2712-find-the-maximum-number-of-marked-indices
2767-maximum-sum-with-exactly-k-elements
2864-maximum-odd-binary-number
2872-largest-element-in-an-array-after-merge-operations
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3334-apple-redistribution-into-boxes
3528-reach-end-of-array-with-max-score

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0812-rotate-string

Monotonic Stack

0042-trapping-rain-water
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
1008-construct-binary-search-tree-from-preorder-traversal
2227-sum-of-subarray-ranges

Number Theory

2106-find-greatest-common-divisor-of-array
2722-prime-in-diagonal
3768-check-if-digits-are-equal-in-string-after-operations-i

Brainteaser

0319-bulb-switcher
2481-strictly-palindromic-number
3462-vowels-game-in-a-string

Game Theory

3462-vowels-game-in-a-string

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0209-minimum-size-subarray-sum
0424-longest-repeating-character-replacement
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
3193-maximum-strong-pair-xor-i

Enumeration

1993-sum-of-all-subset-xor-totals
3221-find-the-peaks
3626-smallest-divisible-digit-product-i

Combinatorics

1993-sum-of-all-subset-xor-totals
2324-find-triangular-sum-of-an-array
3422-find-the-n-th-value-after-k-seconds
3768-check-if-digits-are-equal-in-string-after-operations-i

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Trie

0014-longest-common-prefix
3193-maximum-strong-pair-xor-i

Graph

1916-find-center-of-star-graph

Doubly-Linked List

0146-lru-cache

Queue

1951-find-the-winner-of-the-circular-game

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
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0110-balanced-binary-tree
0114-flatten-binary-tree-to-linked-list
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0662-maximum-width-of-binary-tree
0700-search-in-a-binary-search-tree
0701-insert-into-a-binary-search-tree
0863-all-nodes-distance-k-in-binary-tree
0987-vertical-order-traversal-of-a-binary-tree
1008-construct-binary-search-tree-from-preorder-traversal

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
0114-flatten-binary-tree-to-linked-list
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0543-diameter-of-binary-tree
0662-maximum-width-of-binary-tree
0863-all-nodes-distance-k-in-binary-tree
0987-vertical-order-traversal-of-a-binary-tree

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
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0110-balanced-binary-tree
0114-flatten-binary-tree-to-linked-list
0124-binary-tree-maximum-path-sum
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0173-binary-search-tree-iterator
0199-binary-tree-right-side-view
0222-count-complete-tree-nodes
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0297-serialize-and-deserialize-binary-tree
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0662-maximum-width-of-binary-tree
0700-search-in-a-binary-search-tree
0701-insert-into-a-binary-search-tree
0863-all-nodes-distance-k-in-binary-tree
0987-vertical-order-traversal-of-a-binary-tree
1008-construct-binary-search-tree-from-preorder-traversal

Binary Search Tree

0098-validate-binary-search-tree
0173-binary-search-tree-iterator
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0700-search-in-a-binary-search-tree
0701-insert-into-a-binary-search-tree
1008-construct-binary-search-tree-from-preorder-traversal

Iterator

0173-binary-search-tree-iterator

Interactive

0374-guess-number-higher-or-lower

About

This repository is based on solving DSA problems that helps me boost my problem solving ability

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages