Skip to content

RiddhiBarhate/DSA-in-Cpp

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

Hash Table

0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0169-majority-element
0264-ugly-number-ii
0432-all-oone-data-structure
0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0870-magic-squares-in-grid
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0952-word-subsets
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1147-flip-columns-for-maximum-number-of-equal-rows
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1473-find-the-longest-substring-containing-vowels-in-even-counts
1502-construct-k-palindrome-strings
1556-make-two-arrays-equal-by-reversing-subarrays
1620-check-if-array-pairs-are-divisible-by-k
1694-make-sum-divisible-by-p
1715-split-a-string-into-the-max-number-of-unique-substrings
1786-count-the-number-of-consistent-strings
1915-check-if-one-string-swap-can-make-strings-equal
2054-the-number-of-the-smallest-unoccupied-chair
2059-unique-length-3-palindromic-subsequences
2163-kth-distinct-string-in-an-array
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2552-maximum-sum-of-distinct-subarrays-with-length-k
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2599-take-k-of-each-character-from-left-and-right
2640-maximum-number-of-integers-to-choose-from-a-range-i
2677-cousins-in-binary-tree-ii
2685-first-completely-painted-row-or-column
2695-find-score-of-an-array-after-marking-all-elements
2755-extra-characters-in-a-string
2766-find-the-prefix-common-array-of-two-arrays
3276-minimum-number-of-pushes-to-type-word-ii
3329-find-the-length-of-the-longest-common-prefix
3455-minimum-length-of-string-after-operations
3501-delete-nodes-from-linked-list-present-in-array

String

0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0058-length-of-last-word
0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0344-reverse-string
0443-string-compression
0539-minimum-time-difference
0564-find-the-closest-palindrome
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0664-strange-printer
0812-rotate-string
0824-number-of-lines-to-write-string
0920-uncommon-words-from-two-sentences
0952-word-subsets
0957-minimum-add-to-make-parentheses-valid
1197-parsing-a-boolean-expression
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1350-remove-sub-folders-from-the-filesystem
1473-find-the-longest-substring-containing-vowels-in-even-counts
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
1651-shuffle-string
1667-find-kth-bit-in-nth-binary-string
1715-split-a-string-into-the-max-number-of-unique-substrings
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1786-count-the-number-of-consistent-strings
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1915-check-if-one-string-swap-can-make-strings-equal
1923-sentence-similarity-iii
2059-unique-length-3-palindromic-subsequences
2076-sum-of-digits-of-string-after-convert
2095-minimum-number-of-swaps-to-make-the-string-balanced
2163-kth-distinct-string-in-an-array
2221-check-if-a-parentheses-string-can-be-valid
2232-adding-spaces-to-a-string
2292-counting-words-with-a-given-prefix
2300-construct-string-with-repeat-limit
2414-move-pieces-to-obtain-a-string
2465-shifting-letters-ii
2494-sum-of-prefix-scores-of-strings
2580-circular-sentence
2599-take-k-of-each-character-from-left-and-right
2691-count-vowel-strings-in-ranges
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2800-minimum-string-length-after-removing-substrings
3018-make-string-a-subsequence-using-cyclic-increments
3174-minimum-number-of-changes-to-make-binary-string-beautiful
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix
3451-string-compression-iii
3455-minimum-length-of-string-after-operations

Backtracking

0017-letter-combinations-of-a-phone-number
0040-combination-sum-ii
0046-permutations
0078-subsets
0494-target-sum
1715-split-a-string-into-the-max-number-of-unique-substrings
2170-count-number-of-maximum-bitwise-or-subsets

Array

0004-median-of-two-sorted-arrays
0026-remove-duplicates-from-sorted-array
0027-remove-element
0035-search-insert-position
0040-combination-sum-ii
0046-permutations
0054-spiral-matrix
0066-plus-one
0074-search-a-2d-matrix
0078-subsets
0088-merge-sorted-array
0136-single-number
0162-find-peak-element
0169-majority-element
0179-largest-number
0189-rotate-array
0204-count-primes
0215-kth-largest-element-in-an-array
0228-summary-ranges
0240-search-a-2d-matrix-ii
0322-coin-change
0407-trapping-rain-water-ii
0485-max-consecutive-ones
0494-target-sum
0539-minimum-time-difference
0624-maximum-distance-in-arrays
0632-smallest-range-covering-elements-from-k-lists
0689-maximum-sum-of-3-non-overlapping-subarrays
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0780-max-chunks-to-make-sorted
0787-sliding-puzzle
0824-number-of-lines-to-write-string
0854-making-a-large-island
0859-design-circular-deque
0860-design-circular-queue
0870-magic-squares-in-grid
0882-peak-index-in-a-mountain-array
0890-lemonade-change
0892-shortest-subarray-with-sum-at-least-k
0906-walking-robot-simulation
0921-spiral-matrix-iii
0952-word-subsets
0999-regions-cut-by-slashes
1002-maximum-width-ramp
1019-squares-of-a-sorted-array
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1147-flip-columns-for-maximum-number-of-equal-rows
1240-stone-game-ii
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1325-path-with-maximum-probability
1350-remove-sub-folders-from-the-filesystem
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1435-xor-queries-of-a-subarray
1468-check-if-n-and-its-double-exist
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1497-design-a-stack-with-increment-operation
1524-string-matching-in-an-array
1556-make-two-arrays-equal-by-reversing-subarrays
1570-final-prices-with-a-special-discount-in-a-shop
1615-range-sum-of-sorted-subarray-sums
1620-check-if-array-pairs-are-divisible-by-k
1651-shuffle-string
1656-count-good-triplets
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1691-minimum-number-of-days-to-disconnect-island
1694-make-sum-divisible-by-p
1704-special-positions-in-a-binary-matrix
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1755-defuse-the-bomb
1766-minimum-number-of-removals-to-make-mountain-array
1786-count-the-number-of-consistent-strings
1876-map-of-highest-peak
1878-check-if-array-is-sorted-and-rotated
1886-minimum-limit-of-balls-in-a-bag
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1917-maximum-average-pass-ratio
1923-sentence-similarity-iii
1927-maximum-ascending-subarray-sum
1940-maximum-xor-for-each-query
1972-rotating-the-box
2006-find-the-student-that-will-replace-the-chalk
2035-count-sub-islands
2054-the-number-of-the-smallest-unoccupied-chair
2067-maximum-number-of-points-with-cost
2089-maximum-matrix-sum
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2164-two-best-non-overlapping-events
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2232-adding-spaces-to-a-string
2255-minimum-swaps-to-group-all-1s-together-ii
2292-counting-words-with-a-given-prefix
2343-count-unguarded-cells-in-the-grid
2356-largest-combination-with-bitwise-and-greater-than-zero
2358-number-of-ways-to-split-array
2375-minimum-obstacle-removal-to-reach-corner
2411-spiral-matrix-iv
2465-shifting-letters-ii
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings
2545-height-of-binary-tree-after-subtree-removal-queries
2552-maximum-sum-of-distinct-subarrays-with-length-k
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2685-first-completely-painted-row-or-column
2691-count-vowel-strings-in-ranges
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2711-minimum-time-to-visit-a-cell-in-a-grid
2716-prime-subtraction-operation
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2764-maximum-number-of-fish-in-a-grid
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
2794-maximum-number-of-moves-in-a-grid
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3219-make-lexicographically-smallest-array-by-swapping-elements
3291-find-if-array-can-be-sorted
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix
3372-longest-strictly-increasing-or-strictly-decreasing-subarray
3380-shortest-subarray-with-or-at-least-k-ii
3427-special-array-ii
3429-special-array-i
3501-delete-nodes-from-linked-list-present-in-array
3517-shortest-distance-after-road-addition-queries-i
3522-find-the-power-of-k-size-subarrays-i
3555-final-array-state-after-k-multiplication-operations-i

Sliding Window

0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0892-shortest-subarray-with-sum-at-least-k
1755-defuse-the-bomb
2255-minimum-swaps-to-group-all-1s-together-ii
2552-maximum-sum-of-distinct-subarrays-with-length-k
2599-take-k-of-each-character-from-left-and-right
2868-continuous-subarrays
2891-maximum-beauty-of-an-array-after-applying-operation
3380-shortest-subarray-with-or-at-least-k-ii
3522-find-the-power-of-k-size-subarrays-i

Dynamic Programming

0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0322-coin-change
0494-target-sum
0650-2-keys-keyboard
0664-strange-printer
0689-maximum-sum-of-3-non-overlapping-subarrays
1025-minimum-cost-for-tickets
1063-best-sightseeing-pair
1240-stone-game-ii
1402-count-square-submatrices-with-all-ones
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1766-minimum-number-of-removals-to-make-mountain-array
2067-maximum-number-of-points-with-cost
2164-two-best-non-overlapping-events
2554-minimum-total-distance-traveled
2562-count-ways-to-build-good-strings
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid

Breadth-First Search

0322-coin-change
0407-trapping-rain-water-ii
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0787-sliding-puzzle
0854-making-a-large-island
0999-regions-cut-by-slashes
1396-count-servers-that-communicate
1484-linked-list-in-binary-tree
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
1691-minimum-number-of-days-to-disconnect-island
1876-map-of-highest-peak
2035-count-sub-islands
2375-minimum-obstacle-removal-to-reach-corner
2493-reverse-odd-levels-of-binary-tree
2545-height-of-binary-tree-after-subtree-removal-queries
2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level
2583-divide-nodes-into-the-maximum-number-of-groups
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii
2711-minimum-time-to-visit-a-cell-in-a-grid
2764-maximum-number-of-fish-in-a-grid
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i

Sorting

0088-merge-sorted-array
0169-majority-element
0179-largest-number
0215-kth-largest-element-in-an-array
0539-minimum-time-difference
0632-smallest-range-covering-elements-from-k-lists
0719-find-k-th-smallest-pair-distance
0780-max-chunks-to-make-sorted
1019-squares-of-a-sorted-array
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2488-divide-intervals-into-minimum-number-of-groups
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2640-maximum-number-of-integers-to-choose-from-a-range-i
2646-kth-largest-sum-in-a-binary-tree
2695-find-score-of-an-array-after-marking-all-elements
2699-count-the-number-of-fair-pairs
2891-maximum-beauty-of-an-array-after-applying-operation
3219-make-lexicographically-smallest-array-by-swapping-elements
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted

Two Pointers

0026-remove-duplicates-from-sorted-array
0027-remove-element
0088-merge-sorted-array
0189-rotate-array
0344-reverse-string
0443-string-compression
0567-permutation-in-string
0719-find-k-th-smallest-pair-distance
1019-squares-of-a-sorted-array
1468-check-if-n-and-its-double-exist
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
1923-sentence-similarity-iii
1972-rotating-the-box
2095-minimum-number-of-swaps-to-make-the-string-balanced
2232-adding-spaces-to-a-string
2414-move-pieces-to-obtain-a-string
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill
2699-count-the-number-of-fair-pairs
3018-make-string-a-subsequence-using-cyclic-increments
3195-separate-black-and-white-balls

Binary Search

0004-median-of-two-sorted-arrays
0035-search-insert-position
0074-search-a-2d-matrix
0162-find-peak-element
0240-search-a-2d-matrix-ii
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0731-my-calendar-ii
0882-peak-index-in-a-mountain-array
0892-shortest-subarray-with-sum-at-least-k
1468-check-if-n-and-its-double-exist
1615-range-sum-of-sorted-subarray-sums
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1766-minimum-number-of-removals-to-make-mountain-array
1886-minimum-limit-of-balls-in-a-bag
2006-find-the-student-that-will-replace-the-chalk
2164-two-best-non-overlapping-events
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2586-longest-square-streak-in-an-array
2640-maximum-number-of-integers-to-choose-from-a-range-i
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2891-maximum-beauty-of-an-array-after-applying-operation
3181-find-building-where-alice-and-bob-can-meet
3427-special-array-ii

Matrix

0054-spiral-matrix
0074-search-a-2d-matrix
0240-search-a-2d-matrix-ii
0407-trapping-rain-water-ii
0787-sliding-puzzle
0854-making-a-large-island
0870-magic-squares-in-grid
0921-spiral-matrix-iii
0999-regions-cut-by-slashes
1147-flip-columns-for-maximum-number-of-equal-rows
1396-count-servers-that-communicate
1402-count-square-submatrices-with-all-ones
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1691-minimum-number-of-days-to-disconnect-island
1704-special-positions-in-a-binary-matrix
1876-map-of-highest-peak
1972-rotating-the-box
2035-count-sub-islands
2089-maximum-matrix-sum
2132-convert-1d-array-into-2d-array
2343-count-unguarded-cells-in-the-grid
2375-minimum-obstacle-removal-to-reach-corner
2411-spiral-matrix-iv
2685-first-completely-painted-row-or-column
2711-minimum-time-to-visit-a-cell-in-a-grid
2764-maximum-number-of-fish-in-a-grid
2794-maximum-number-of-moves-in-a-grid

Simulation

0054-spiral-matrix
0592-fraction-addition-and-subtraction
0906-walking-robot-simulation
0921-spiral-matrix-iii
1667-find-kth-bit-in-nth-binary-string
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
2232-adding-spaces-to-a-string
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2800-minimum-string-length-after-removing-substrings
3555-final-array-state-after-k-multiplication-operations-i

Counting

0169-majority-element
0920-uncommon-words-from-two-sentences
1396-count-servers-that-communicate
1502-construct-k-palindrome-strings
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
1915-check-if-one-string-swap-can-make-strings-equal
2163-kth-distinct-string-in-an-array
2300-construct-string-with-repeat-limit
2356-largest-combination-with-bitwise-and-greater-than-zero
2494-sum-of-prefix-scores-of-strings
3276-minimum-number-of-pushes-to-type-word-ii
3455-minimum-length-of-string-after-operations

Bit Manipulation

0078-subsets
0136-single-number
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
1940-maximum-xor-for-each-query
2059-unique-length-3-palindromic-subsequences
2170-count-number-of-maximum-bitwise-or-subsets
2323-minimum-bit-flips-to-convert-number
2356-largest-combination-with-bitwise-and-greater-than-zero
2503-longest-subarray-with-maximum-bitwise-and
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays
2792-neighboring-bitwise-xor
3291-find-if-array-can-be-sorted
3380-shortest-subarray-with-or-at-least-k-ii
3394-minimum-array-end

Greedy

0179-largest-number
0624-maximum-distance-in-arrays
0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0780-max-chunks-to-make-sorted
0890-lemonade-change
0957-minimum-add-to-make-parentheses-valid
1304-longest-happy-string
1502-construct-k-palindrome-strings
1766-minimum-number-of-removals-to-make-mountain-array
1917-maximum-average-pass-ratio
2089-maximum-matrix-sum
2095-minimum-number-of-swaps-to-make-the-string-balanced
2221-check-if-a-parentheses-string-can-be-valid
2300-construct-string-with-repeat-limit
2488-divide-intervals-into-minimum-number-of-groups
2509-minimize-xor
2616-maximal-score-after-applying-k-operations
2640-maximum-number-of-integers-to-choose-from-a-range-i
2716-prime-subtraction-operation
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii

Math

0009-palindrome-number
0013-roman-to-integer
0066-plus-one
0189-rotate-array
0204-count-primes
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0273-integer-to-english-words
0539-minimum-time-difference
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0670-maximum-swap
0870-magic-squares-in-grid
1240-stone-game-ii
2155-find-missing-observations
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list
3555-final-array-state-after-k-multiplication-operations-i

Recursion

0241-different-ways-to-add-parentheses
0273-integer-to-english-words
1197-parsing-a-boolean-expression
1667-find-kth-bit-in-nth-binary-string

Linked List

0083-remove-duplicates-from-sorted-list
0432-all-oone-data-structure
0725-split-linked-list-in-parts
0859-design-circular-deque
0860-design-circular-queue
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

Depth-First Search

0145-binary-tree-postorder-traversal
0386-lexicographical-numbers
0515-find-largest-value-in-each-tree-row
0684-redundant-connection
0776-n-ary-tree-postorder-traversal
0854-making-a-large-island
0984-most-stones-removed-with-same-row-or-column
0988-flip-equivalent-binary-trees
0999-regions-cut-by-slashes
1350-remove-sub-folders-from-the-filesystem
1396-count-servers-that-communicate
1484-linked-list-in-binary-tree
1558-course-schedule-iv
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2201-valid-arrangement-of-pairs
2246-maximum-employees-to-be-invited-to-a-meeting
2493-reverse-odd-levels-of-binary-tree
2545-height-of-binary-tree-after-subtree-removal-queries
2677-cousins-in-binary-tree-ii
2764-maximum-number-of-fish-in-a-grid
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Union Find

0684-redundant-connection
0854-making-a-large-island
0984-most-stones-removed-with-same-row-or-column
0999-regions-cut-by-slashes
1396-count-servers-that-communicate
2035-count-sub-islands
2583-divide-nodes-into-the-maximum-number-of-groups
2764-maximum-number-of-fish-in-a-grid
3219-make-lexicographically-smallest-array-by-swapping-elements

Strongly Connected Component

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

Tree

0145-binary-tree-postorder-traversal
0515-find-largest-value-in-each-tree-row
0776-n-ary-tree-postorder-traversal
0789-kth-largest-element-in-a-stream
0988-flip-equivalent-binary-trees
1484-linked-list-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2545-height-of-binary-tree-after-subtree-removal-queries
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
3058-maximum-number-of-k-divisible-components
3439-find-minimum-diameter-after-merging-two-trees

Design

0432-all-oone-data-structure
0729-my-calendar-i
0731-my-calendar-ii
0789-kth-largest-element-in-a-stream
0859-design-circular-deque
0860-design-circular-queue
1497-design-a-stack-with-increment-operation

Binary Search Tree

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

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0264-ugly-number-ii
0407-trapping-rain-water-ii
0632-smallest-range-covering-elements-from-k-lists
0789-kth-largest-element-in-a-stream
0892-shortest-subarray-with-sum-at-least-k
1304-longest-happy-string
1325-path-with-maximum-probability
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1917-maximum-average-pass-ratio
2054-the-number-of-the-smallest-unoccupied-chair
2164-two-best-non-overlapping-events
2300-construct-string-with-repeat-limit
2375-minimum-obstacle-removal-to-reach-corner
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2692-take-gifts-from-the-richest-pile
2695-find-score-of-an-array-after-marking-all-elements
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
2868-continuous-subarrays
3181-find-building-where-alice-and-bob-can-meet
3555-final-array-state-after-k-multiplication-operations-i

Binary Tree

0145-binary-tree-postorder-traversal
0515-find-largest-value-in-each-tree-row
0789-kth-largest-element-in-a-stream
0988-flip-equivalent-binary-trees
1484-linked-list-in-binary-tree
2493-reverse-odd-levels-of-binary-tree
2545-height-of-binary-tree-after-subtree-removal-queries
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

Data Stream

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

Enumeration

0204-count-primes
1656-count-good-triplets
2170-count-number-of-maximum-bitwise-or-subsets

Number Theory

0204-count-primes
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list

Divide and Conquer

0004-median-of-two-sorted-arrays
0169-majority-element
0215-kth-largest-element-in-an-array
0240-search-a-2d-matrix-ii

Prefix Sum

0731-my-calendar-ii
0892-shortest-subarray-with-sum-at-least-k
1240-stone-game-ii
1435-xor-queries-of-a-subarray
1473-find-the-longest-substring-containing-vowels-in-even-counts
1537-maximum-score-after-splitting-a-string
1694-make-sum-divisible-by-p
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1940-maximum-xor-for-each-query
2006-find-the-student-that-will-replace-the-chalk
2059-unique-length-3-palindromic-subsequences
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2488-divide-intervals-into-minimum-number-of-groups
2691-count-vowel-strings-in-ranges
3427-special-array-ii

Game Theory

1240-stone-game-ii

Stack

0020-valid-parentheses
0145-binary-tree-postorder-traversal
0776-n-ary-tree-postorder-traversal
0780-max-chunks-to-make-sorted
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1197-parsing-a-boolean-expression
1497-design-a-stack-with-increment-operation
1570-final-prices-with-a-special-discount-in-a-shop
1679-shortest-subarray-to-be-removed-to-make-array-sorted
2095-minimum-number-of-swaps-to-make-the-string-balanced
2221-check-if-a-parentheses-string-can-be-valid
2800-minimum-string-length-after-removing-substrings
3181-find-building-where-alice-and-bob-can-meet

Graph

0684-redundant-connection
0984-most-stones-removed-with-same-row-or-column
1325-path-with-maximum-probability
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
1558-course-schedule-iv
2201-valid-arrangement-of-pairs
2246-maximum-employees-to-be-invited-to-a-meeting
2375-minimum-obstacle-removal-to-reach-corner
2583-divide-nodes-into-the-maximum-number-of-groups
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights
3189-find-champion-ii
3439-find-minimum-diameter-after-merging-two-trees
3517-shortest-distance-after-road-addition-queries-i

Shortest Path

1325-path-with-maximum-probability
1485-minimum-cost-to-make-at-least-one-valid-path-in-a-grid
2375-minimum-obstacle-removal-to-reach-corner
2711-minimum-time-to-visit-a-cell-in-a-grid
2803-modify-graph-edge-weights

Quickselect

0215-kth-largest-element-in-an-array

Brainteaser

2503-longest-subarray-with-maximum-bitwise-and
2533-bitwise-xor-of-all-pairings

Memoization

0241-different-ways-to-add-parentheses

Rolling Hash

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

String Matching

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

Hash Function

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

Trie

0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
1350-remove-sub-folders-from-the-filesystem
2494-sum-of-prefix-scores-of-strings
2755-extra-characters-in-a-string
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix

Segment Tree

0729-my-calendar-i
0731-my-calendar-ii
3181-find-building-where-alice-and-bob-can-meet

Ordered Set

0729-my-calendar-i
0731-my-calendar-ii
2868-continuous-subarrays

Queue

0859-design-circular-deque
0860-design-circular-queue
0892-shortest-subarray-with-sum-at-least-k
2868-continuous-subarrays

Doubly-Linked List

0432-all-oone-data-structure

Database

0197-rising-temperature
0584-find-customer-referee
0595-big-countries
0620-not-boring-movies
1153-product-sales-analysis-i
1258-article-views-i
1509-replace-employee-id-with-the-unique-identifier
1724-customer-who-visited-but-did-not-make-any-transactions
1827-invalid-tweets
1908-recyclable-and-low-fat-products

Monotonic Stack

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

Monotonic Queue

0892-shortest-subarray-with-sum-at-least-k
2868-continuous-subarrays

Eulerian Circuit

2201-valid-arrangement-of-pairs

Binary Indexed Tree

3181-find-building-where-alice-and-bob-can-meet

Topological Sort

1558-course-schedule-iv
2246-maximum-employees-to-be-invited-to-a-meeting

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published