Skip to content

OmkarS25/DSA-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Structures and Algorithms Practice

This repository contains solutions to various data structures and algorithms practice questions from LeetCode and GeeksforGeeks. Each problem is solved in C++, and the solutions are organized for each questions separately.

Contributing

Acknowledgments

Two Pointers

0026-remove-duplicates-from-sorted-array
0027-remove-element
0061-rotate-list
0075-sort-colors
0088-merge-sorted-array
0125-valid-palindrome
0148-sort-list
0344-reverse-string
0633-sum-of-square-numbers
0853-most-profit-assigning-work
2392-successful-pairs-of-spells-and-potions
2497-maximum-matching-of-players-with-trainers
2572-append-characters-to-string-to-make-subsequence

String

0012-integer-to-roman
0014-longest-common-prefix
0020-valid-parentheses
0067-add-binary
0125-valid-palindrome
0171-excel-sheet-column-number
0344-reverse-string
0409-longest-palindrome
0648-replace-words
1044-find-common-characters
2572-append-characters-to-string-to-make-subsequence

Trie

0014-longest-common-prefix
0648-replace-words

Greedy

0330-patching-array
0409-longest-palindrome
0502-ipo
0561-array-partition
0853-most-profit-assigning-work
0876-hand-of-straights
0982-minimum-increment-to-make-array-unique
1285-balance-a-binary-search-tree
1422-divide-array-in-sets-of-k-consecutive-numbers
2148-minimum-number-of-moves-to-seat-everyone
2497-maximum-matching-of-players-with-trainers
2572-append-characters-to-string-to-make-subsequence

Hash Table

0012-integer-to-roman
0409-longest-palindrome
0523-continuous-subarray-sum
0648-replace-words
0876-hand-of-straights
1016-subarray-sums-divisible-by-k
1044-find-common-characters
1217-relative-sort-array
1370-count-number-of-nice-subarrays
1422-divide-array-in-sets-of-k-consecutive-numbers

Array

0026-remove-duplicates-from-sorted-array
0027-remove-element
0035-search-insert-position
0075-sort-colors
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0330-patching-array
0502-ipo
0523-continuous-subarray-sum
0561-array-partition
0648-replace-words
0853-most-profit-assigning-work
0876-hand-of-straights
0948-sort-an-array
0982-minimum-increment-to-make-array-unique
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips
1044-find-common-characters
1137-height-checker
1138-grumpy-bookstore-owner
1217-relative-sort-array
1370-count-number-of-nice-subarrays
1422-divide-array-in-sets-of-k-consecutive-numbers
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone
2392-successful-pairs-of-spells-and-potions
2497-maximum-matching-of-players-with-trainers

Binary Search

0035-search-insert-position
0633-sum-of-square-numbers
0853-most-profit-assigning-work
1605-minimum-number-of-days-to-make-m-bouquets
1675-magnetic-force-between-two-balls
2392-successful-pairs-of-spells-and-potions

Sorting

0075-sort-colors
0088-merge-sorted-array
0148-sort-list
0502-ipo
0561-array-partition
0853-most-profit-assigning-work
0876-hand-of-straights
0948-sort-an-array
0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array
1422-divide-array-in-sets-of-k-consecutive-numbers
1675-magnetic-force-between-two-balls
2148-minimum-number-of-moves-to-seat-everyone
2392-successful-pairs-of-spells-and-potions
2497-maximum-matching-of-players-with-trainers

Linked List

0061-rotate-list
0083-remove-duplicates-from-sorted-list
0148-sort-list

Math

0012-integer-to-roman
0067-add-binary
0171-excel-sheet-column-number
0523-continuous-subarray-sum
0633-sum-of-square-numbers
1370-count-number-of-nice-subarrays

Prefix Sum

0523-continuous-subarray-sum
1016-subarray-sums-divisible-by-k
1037-minimum-number-of-k-consecutive-bit-flips

Counting Sort

0561-array-partition
0948-sort-an-array
0982-minimum-increment-to-make-array-unique
1137-height-checker
1217-relative-sort-array

Divide and Conquer

0108-convert-sorted-array-to-binary-search-tree
0148-sort-list
0948-sort-an-array
1285-balance-a-binary-search-tree

Heap (Priority Queue)

0502-ipo
0948-sort-an-array
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Merge Sort

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

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Stack

0020-valid-parentheses
0094-binary-tree-inorder-traversal

Bit Manipulation

0067-add-binary
1037-minimum-number-of-k-consecutive-bit-flips

Simulation

0067-add-binary

Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0538-convert-bst-to-greater-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0100-same-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0538-convert-bst-to-greater-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Breadth-First Search

0100-same-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum

Binary Tree

0094-binary-tree-inorder-traversal
0100-same-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0538-convert-bst-to-greater-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Sliding Window

1037-minimum-number-of-k-consecutive-bit-flips
1138-grumpy-bookstore-owner
1370-count-number-of-nice-subarrays
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Queue

1037-minimum-number-of-k-consecutive-bit-flips
1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Ordered Set

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Monotonic Queue

1549-longest-continuous-subarray-with-absolute-diff-less-than-or-equal-to-limit

Binary Search Tree

0108-convert-sorted-array-to-binary-search-tree
0538-convert-bst-to-greater-tree
1114-binary-search-tree-to-greater-sum-tree
1285-balance-a-binary-search-tree

Graph

1916-find-center-of-star-graph

LeetCode Topics

Depth-First Search

0145-binary-tree-postorder-traversal
0386-lexicographical-numbers
0501-find-mode-in-binary-search-tree
0776-n-ary-tree-postorder-traversal
0988-flip-equivalent-binary-trees
0999-regions-cut-by-slashes
1207-delete-nodes-and-return-forest
1350-remove-sub-folders-from-the-filesystem
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2545-height-of-binary-tree-after-subtree-removal-queries
2677-cousins-in-binary-tree-ii

Breadth-First Search

0999-regions-cut-by-slashes
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1484-linked-list-in-binary-tree
1691-minimum-number-of-days-to-disconnect-island
2035-count-sub-islands
2171-second-minimum-time-to-reach-destination
2545-height-of-binary-tree-after-subtree-removal-queries
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Graph

1325-path-with-maximum-probability
1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2472-build-a-matrix-with-conditions
2803-modify-graph-edge-weights

Topological Sort

1431-all-ancestors-of-a-node-in-a-directed-acyclic-graph
2472-build-a-matrix-with-conditions

Tree

0145-binary-tree-postorder-traversal
0501-find-mode-in-binary-search-tree
0776-n-ary-tree-postorder-traversal
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0988-flip-equivalent-binary-trees
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions
2545-height-of-binary-tree-after-subtree-removal-queries
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Binary Search Tree

0278-first-bad-version
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0501-find-mode-in-binary-search-tree
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0792-binary-search
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
2006-find-the-student-that-will-replace-the-chalk
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2586-longest-square-streak-in-an-array
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2720-minimize-the-maximum-difference-of-pairs

Binary Tree

0145-binary-tree-postorder-traversal
0501-find-mode-in-binary-search-tree
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0988-flip-equivalent-binary-trees
1207-delete-nodes-and-return-forest
1484-linked-list-in-binary-tree
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2306-create-binary-tree-from-descriptions
2545-height-of-binary-tree-after-subtree-removal-queries
2646-kth-largest-sum-in-a-binary-tree
2677-cousins-in-binary-tree-ii

Array

0001-two-sum
0040-combination-sum-ii
0054-spiral-matrix
0179-largest-number
0219-contains-duplicate-ii
0283-move-zeroes
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0632-smallest-range-covering-elements-from-k-lists
0682-baseball-game
0719-find-k-th-smallest-pair-distance
0729-my-calendar-i
0792-binary-search
0859-design-circular-deque
0870-magic-squares-in-grid
0906-walking-robot-simulation
0948-sort-an-array
0999-regions-cut-by-slashes
1002-maximum-width-ramp
1196-filling-bookcase-shelves
1207-delete-nodes-and-return-forest
1240-stone-game-ii
1256-rank-transform-of-an-array
1293-three-consecutive-odds
1325-path-with-maximum-probability
1333-sort-the-jumbled-numbers
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
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
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1620-check-if-array-pairs-are-divisible-by-k
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1691-minimum-number-of-days-to-disconnect-island
1694-make-sum-divisible-by-p
1711-find-valid-matrix-given-row-and-column-sums
1720-crawler-log-folder
1741-sort-array-by-increasing-frequency
1755-defuse-the-bomb
1766-minimum-number-of-removals-to-make-mountain-array
1786-count-the-number-of-consistent-strings
1803-average-waiting-time
1923-sentence-similarity-iii
1951-find-the-winner-of-the-circular-game
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
2132-convert-1d-array-into-2d-array
2155-find-missing-observations
2163-kth-distinct-string-in-an-array
2170-count-number-of-maximum-bitwise-or-subsets
2179-most-beautiful-item-for-each-query
2188-minimized-maximum-of-products-distributed-to-any-store
2255-minimum-swaps-to-group-all-1s-together-ii
2306-create-binary-tree-from-descriptions
2331-intersection-of-multiple-arrays
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions
2488-divide-intervals-into-minimum-number-of-groups
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2503-longest-subarray-with-maximum-bitwise-and
2545-height-of-binary-tree-after-subtree-removal-queries
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
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
2716-prime-subtraction-operation
2720-minimize-the-maximum-difference-of-pairs
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid
2846-robot-collisions
3291-find-if-array-can-be-sorted
3329-find-the-length-of-the-longest-common-prefix
3380-shortest-subarray-with-or-at-least-k-ii
3501-delete-nodes-from-linked-list-present-in-array
3522-find-the-power-of-k-size-subarrays-i

Hash Table

0001-two-sum
0202-happy-number
0219-contains-duplicate-ii
0264-ugly-number-ii
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0432-all-oone-data-structure
0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
0726-number-of-atoms
0870-magic-squares-in-grid
0906-walking-robot-simulation
0920-uncommon-words-from-two-sentences
0999-regions-cut-by-slashes
1207-delete-nodes-and-return-forest
1256-rank-transform-of-an-array
1392-find-the-difference-of-two-arrays
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
1741-sort-array-by-increasing-frequency
1786-count-the-number-of-consistent-strings
2054-the-number-of-the-smallest-unoccupied-chair
2163-kth-distinct-string-in-an-array
2306-create-binary-tree-from-descriptions
2331-intersection-of-multiple-arrays
2502-sort-the-people
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
2634-minimum-common-value
2677-cousins-in-binary-tree-ii
2755-extra-characters-in-a-string
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

Sliding Window

0219-contains-duplicate-ii
0567-permutation-in-string
0632-smallest-range-covering-elements-from-k-lists
1755-defuse-the-bomb
2255-minimum-swaps-to-group-all-1s-together-ii
2599-take-k-of-each-character-from-left-and-right
3380-shortest-subarray-with-or-at-least-k-ii
3522-find-the-power-of-k-size-subarrays-i

Two Pointers

0202-happy-number
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
0874-backspace-string-compare
1615-range-sum-of-sorted-subarray-sums
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1923-sentence-similarity-iii
2095-minimum-number-of-swaps-to-make-the-string-balanced
2488-divide-intervals-into-minimum-number-of-groups
2581-divide-players-into-teams-of-equal-skill
2634-minimum-common-value
2699-count-the-number-of-fair-pairs
3195-separate-black-and-white-balls

Sorting

0179-largest-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0632-smallest-range-covering-elements-from-k-lists
0719-find-k-th-smallest-pair-distance
0726-number-of-atoms
0948-sort-an-array
1256-rank-transform-of-an-array
1333-sort-the-jumbled-numbers
1556-make-two-arrays-equal-by-reversing-subarrays
1615-range-sum-of-sorted-subarray-sums
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1741-sort-array-by-increasing-frequency
2179-most-beautiful-item-for-each-query
2331-intersection-of-multiple-arrays
2488-divide-intervals-into-minimum-number-of-groups
2502-sort-the-people
2554-minimum-total-distance-traveled
2581-divide-players-into-teams-of-equal-skill
2586-longest-square-streak-in-an-array
2646-kth-largest-sum-in-a-binary-tree
2699-count-the-number-of-fair-pairs
2846-robot-collisions
3276-minimum-number-of-pushes-to-type-word-ii
3291-find-if-array-can-be-sorted

Counting

0920-uncommon-words-from-two-sentences
1620-check-if-array-pairs-are-divisible-by-k
1786-count-the-number-of-consistent-strings
2163-kth-distinct-string-in-an-array
2331-intersection-of-multiple-arrays
2494-sum-of-prefix-scores-of-strings
3276-minimum-number-of-pushes-to-type-word-ii

Greedy

0179-largest-number
0632-smallest-range-covering-elements-from-k-lists
0670-maximum-swap
0957-minimum-add-to-make-parentheses-valid
1304-longest-happy-string
1616-minimum-difference-between-largest-and-smallest-value-in-three-moves
1711-find-valid-matrix-given-row-and-column-sums
1766-minimum-number-of-removals-to-make-mountain-array
2095-minimum-number-of-swaps-to-make-the-string-balanced
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2716-prime-subtraction-operation
2720-minimize-the-maximum-difference-of-pairs
3195-separate-black-and-white-balls
3276-minimum-number-of-pushes-to-type-word-ii

Math

0089-gray-code
0202-happy-number
0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0273-integer-to-english-words
0564-find-the-closest-palindrome
0592-fraction-addition-and-subtraction
0650-2-keys-keyboard
0670-maximum-swap
0870-magic-squares-in-grid
1013-fibonacci-number
1240-stone-game-ii
1642-water-bottles
1951-find-the-winner-of-the-circular-game
2155-find-missing-observations
2645-pass-the-pillow
2716-prime-subtraction-operation
2903-insert-greatest-common-divisors-in-linked-list

Backtracking

0040-combination-sum-ii
0089-gray-code
1715-split-a-string-into-the-max-number-of-unique-substrings
2170-count-number-of-maximum-bitwise-or-subsets

Bit Manipulation

0089-gray-code
0461-hamming-distance
0476-number-complement
1054-complement-of-base-10-integer
1435-xor-queries-of-a-subarray
1786-count-the-number-of-consistent-strings
2170-count-number-of-maximum-bitwise-or-subsets
2323-minimum-bit-flips-to-convert-number
2503-longest-subarray-with-maximum-bitwise-and
3291-find-if-array-can-be-sorted
3380-shortest-subarray-with-or-at-least-k-ii

Linked List

0432-all-oone-data-structure
0725-split-linked-list-in-parts
0859-design-circular-deque
1484-linked-list-in-binary-tree
2182-find-the-minimum-and-maximum-number-of-nodes-between-critical-points
2411-spiral-matrix-iv
2903-insert-greatest-common-divisors-in-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Simulation

0054-spiral-matrix
0592-fraction-addition-and-subtraction
0682-baseball-game
0874-backspace-string-compare
0906-walking-robot-simulation
1642-water-bottles
1803-average-waiting-time
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
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2645-pass-the-pillow
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions

Recursion

0241-different-ways-to-add-parentheses
0273-integer-to-english-words
1013-fibonacci-number
1197-parsing-a-boolean-expression
1951-find-the-winner-of-the-circular-game

Queue

0859-design-circular-deque
1951-find-the-winner-of-the-circular-game

String

0179-largest-number
0214-shortest-palindrome
0241-different-ways-to-add-parentheses
0273-integer-to-english-words
0564-find-the-closest-palindrome
0567-permutation-in-string
0592-fraction-addition-and-subtraction
0664-strange-printer
0726-number-of-atoms
0812-rotate-string
0874-backspace-string-compare
0920-uncommon-words-from-two-sentences
0957-minimum-add-to-make-parentheses-valid
1197-parsing-a-boolean-expression
1298-reverse-substrings-between-each-pair-of-parentheses
1302-delete-characters-to-make-fancy-string
1304-longest-happy-string
1350-remove-sub-folders-from-the-filesystem
1715-split-a-string-into-the-max-number-of-unique-substrings
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
1786-count-the-number-of-consistent-strings
1923-sentence-similarity-iii
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
2217-step-by-step-directions-from-a-binary-tree-node-to-another
2494-sum-of-prefix-scores-of-strings
2502-sort-the-people
2580-circular-sentence
2599-take-k-of-each-character-from-left-and-right
2727-number-of-senior-citizens
2755-extra-characters-in-a-string
2800-minimum-string-length-after-removing-substrings
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
3329-find-the-length-of-the-longest-common-prefix
3451-string-compression-iii

Stack

0145-binary-tree-postorder-traversal
0682-baseball-game
0726-number-of-atoms
0776-n-ary-tree-postorder-traversal
0874-backspace-string-compare
0957-minimum-add-to-make-parentheses-valid
1002-maximum-width-ramp
1197-parsing-a-boolean-expression
1298-reverse-substrings-between-each-pair-of-parentheses
1497-design-a-stack-with-increment-operation
1679-shortest-subarray-to-be-removed-to-make-array-sorted
1720-crawler-log-folder
1756-minimum-deletions-to-make-string-balanced
2095-minimum-number-of-swaps-to-make-the-string-balanced
2800-minimum-string-length-after-removing-substrings
2846-robot-collisions

Interactive

0278-first-bad-version

Matrix

0054-spiral-matrix
0870-magic-squares-in-grid
0999-regions-cut-by-slashes
1402-count-square-submatrices-with-all-ones
1496-lucky-numbers-in-a-matrix
1691-minimum-number-of-days-to-disconnect-island
1711-find-valid-matrix-given-row-and-column-sums
2035-count-sub-islands
2132-convert-1d-array-into-2d-array
2343-count-unguarded-cells-in-the-grid
2411-spiral-matrix-iv
2472-build-a-matrix-with-conditions
2794-maximum-number-of-moves-in-a-grid

Divide and Conquer

0948-sort-an-array

Heap (Priority Queue)

0264-ugly-number-ii
0632-smallest-range-covering-elements-from-k-lists
0948-sort-an-array
1304-longest-happy-string
1325-path-with-maximum-probability
2054-the-number-of-the-smallest-unoccupied-chair
2488-divide-intervals-into-minimum-number-of-groups
2616-maximal-score-after-applying-k-operations
2803-modify-graph-edge-weights

Merge Sort

0948-sort-an-array

Bucket Sort

0948-sort-an-array

Radix Sort

0948-sort-an-array

Counting Sort

0948-sort-an-array

Dynamic Programming

0241-different-ways-to-add-parentheses
0264-ugly-number-ii
0650-2-keys-keyboard
0664-strange-printer
1013-fibonacci-number
1196-filling-bookcase-shelves
1240-stone-game-ii
1402-count-square-submatrices-with-all-ones
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
1766-minimum-number-of-removals-to-make-mountain-array
2067-maximum-number-of-points-with-cost
2554-minimum-total-distance-traveled
2586-longest-square-streak-in-an-array
2755-extra-characters-in-a-string
2794-maximum-number-of-moves-in-a-grid

Shortest Path

1325-path-with-maximum-probability
1456-find-the-city-with-the-smallest-number-of-neighbors-at-a-threshold-distance
2171-second-minimum-time-to-reach-destination
2803-modify-graph-edge-weights

Binary Indexed Tree

1511-count-number-of-teams

Union Find

0999-regions-cut-by-slashes
2035-count-sub-islands

Strongly Connected Component

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

Prefix Sum

1240-stone-game-ii
1435-xor-queries-of-a-subarray
1694-make-sum-divisible-by-p
2006-find-the-student-that-will-replace-the-chalk
2488-divide-intervals-into-minimum-number-of-groups

Game Theory

1240-stone-game-ii

Number Theory

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

Memoization

0241-different-ways-to-add-parentheses
1013-fibonacci-number

Brainteaser

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

Rolling Hash

0214-shortest-palindrome

String Matching

0214-shortest-palindrome
0812-rotate-string

Hash Function

0214-shortest-palindrome

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
3329-find-the-length-of-the-longest-common-prefix

Design

0432-all-oone-data-structure
0729-my-calendar-i
0859-design-circular-deque
1497-design-a-stack-with-increment-operation

Segment Tree

0729-my-calendar-i

Ordered Set

0729-my-calendar-i

Doubly-Linked List

0432-all-oone-data-structure

Monotonic Stack

1002-maximum-width-ramp
1679-shortest-subarray-to-be-removed-to-make-array-sorted

Enumeration

2170-count-number-of-maximum-bitwise-or-subsets

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages