Skip to content

pigeio/DSA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1,080 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A collection of LeetCode questions to ace the coding interview! - Created using LeetHub v2

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0048-rotate-image
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0130-surrounded-regions
0136-single-number
0137-single-number-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0169-majority-element
0188-best-time-to-buy-and-sell-stock-iv
0189-rotate-array
0198-house-robber
0204-count-primes
0213-house-robber-ii
0215-kth-largest-element-in-an-array
0216-combination-sum-iii
0239-sliding-window-maximum
0240-search-a-2d-matrix-ii
0260-single-number-iii
0268-missing-number
0283-move-zeroes
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0347-top-k-frequent-elements
0368-largest-divisible-subset
0403-frog-jump
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0455-assign-cookies
0485-max-consecutive-ones
0494-target-sum
0496-next-greater-element-i
0503-next-greater-element-ii
0518-coin-change-ii
0540-single-element-in-a-sorted-array
0542-01-matrix
0560-subarray-sum-equals-k
0611-valid-triangle-number
0621-task-scheduler
0673-number-of-longest-increasing-subsequence
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0733-flood-fill
0735-asteroid-collision
0792-binary-search
0816-design-hashset
0830-largest-triangle-area
0876-hand-of-straights
0890-lemonade-change
0907-koko-eating-bananas
0940-fruit-into-baskets
0943-sum-of-subarray-minimums
0966-binary-subarrays-with-sum
1008-construct-binary-search-tree-from-preorder-traversal
1032-satisfiability-of-equality-equations
1034-subarrays-with-k-different-integers
1036-rotting-oranges
1046-max-consecutive-ones-iii
1048-longest-string-chain
1056-capacity-to-ship-packages-within-d-days
1073-number-of-enclaves
1111-minimum-score-triangulation-of-polygon
1171-shortest-path-in-binary-matrix
1256-rank-transform-of-an-array
1353-find-resultant-array-after-removing-anagrams
1370-count-number-of-nice-subarrays
1408-find-the-smallest-divisor-given-a-threshold
1538-maximum-points-you-can-obtain-from-cards
1548-check-if-all-1s-are-at-least-length-k-places-away
1559-cherry-pickup-ii
1605-minimum-number-of-days-to-make-m-bouquets
1612-avoid-flood-in-the-city
1646-kth-missing-positive-number
1669-minimum-cost-to-cut-a-stick
1700-minimum-time-to-make-rope-colorful
1706-min-cost-to-connect-all-points
1753-path-with-minimum-effort
1834-minimum-number-of-people-to-teach
1878-check-if-array-is-sorted-and-rotated
2137-final-value-of-variable-after-performing-operations
2227-sum-of-subarray-ranges
2271-rearrange-array-elements-by-sign
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
2661-smallest-missing-non-negative-integer-after-operations
3043-find-the-length-of-the-longest-common-prefix
3242-count-elements-with-maximum-frequency
3383-taking-maximum-energy-from-the-mystic-dungeon
3437-maximum-total-damage-with-spell-casting
3501-delete-nodes-from-linked-list-present-in-array
3512-minimum-operations-to-make-array-sum-divisible-by-k
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3612-adjacent-increasing-subarrays-detection-i
3616-make-array-elements-equal-to-zero
3619-adjacent-increasing-subarrays-detection-ii
3797-design-spreadsheet

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
0162-find-peak-element
0222-count-complete-tree-nodes
0240-search-a-2d-matrix-ii
0268-missing-number
0300-longest-increasing-subsequence
0540-single-element-in-a-sorted-array
0611-valid-triangle-number
0792-binary-search
0907-koko-eating-bananas
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
1612-avoid-flood-in-the-city
1646-kth-missing-positive-number
1753-path-with-minimum-effort
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting
3619-adjacent-increasing-subarrays-detection-ii

Divide and Conquer

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

Matrix

0036-valid-sudoku
0037-sudoku-solver
0048-rotate-image
0054-spiral-matrix
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0085-maximal-rectangle
0130-surrounded-regions
0240-search-a-2d-matrix-ii
0542-01-matrix
0733-flood-fill
1036-rotting-oranges
1073-number-of-enclaves
1171-shortest-path-in-binary-matrix
1559-cherry-pickup-ii
1753-path-with-minimum-effort
2343-count-unguarded-cells-in-the-grid
3797-design-spreadsheet

Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-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
0124-binary-tree-maximum-path-sum
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
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0662-maximum-width-of-binary-tree
0789-kth-largest-element-in-a-stream
0893-all-nodes-distance-k-in-binary-tree
1008-construct-binary-search-tree-from-preorder-traversal
1029-vertical-order-traversal-of-a-binary-tree
2384-root-equals-sum-of-children
2461-amount-of-time-for-binary-tree-to-be-infected

Depth-First Search

0079-word-search
0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0543-diameter-of-binary-tree
0547-number-of-provinces
0662-maximum-width-of-binary-tree
0733-flood-fill
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0893-all-nodes-distance-k-in-binary-tree
0984-most-stones-removed-with-same-row-or-column
1029-vertical-order-traversal-of-a-binary-tree
1073-number-of-enclaves
1442-number-of-operations-to-make-network-connected
1747-lexicographically-smallest-string-after-applying-operations
1753-path-with-minimum-effort
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2461-amount-of-time-for-binary-tree-to-be-infected
2793-count-the-number-of-complete-components

Binary Search Tree

0098-validate-binary-search-tree
0099-recover-binary-search-tree
0173-binary-search-tree-iterator
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0789-kth-largest-element-in-a-stream
1008-construct-binary-search-tree-from-preorder-traversal

Binary Tree

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0099-recover-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
0124-binary-tree-maximum-path-sum
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
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0662-maximum-width-of-binary-tree
0789-kth-largest-element-in-a-stream
0893-all-nodes-distance-k-in-binary-tree
1008-construct-binary-search-tree-from-preorder-traversal
1029-vertical-order-traversal-of-a-binary-tree
2384-root-equals-sum-of-children
2461-amount-of-time-for-binary-tree-to-be-infected

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
0127-word-ladder
0130-surrounded-regions
0199-binary-tree-right-side-view
0207-course-schedule
0210-course-schedule-ii
0322-coin-change
0542-01-matrix
0547-number-of-provinces
0662-maximum-width-of-binary-tree
0733-flood-fill
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0893-all-nodes-distance-k-in-binary-tree
1029-vertical-order-traversal-of-a-binary-tree
1036-rotting-oranges
1073-number-of-enclaves
1171-shortest-path-in-binary-matrix
1442-number-of-operations-to-make-network-connected
1747-lexicographically-smallest-string-after-applying-operations
1753-path-with-minimum-effort
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2461-amount-of-time-for-binary-tree-to-be-infected
2793-count-the-number-of-complete-components

Union Find

0130-surrounded-regions
0547-number-of-provinces
0801-is-graph-bipartite
0984-most-stones-removed-with-same-row-or-column
1032-satisfiability-of-equality-equations
1073-number-of-enclaves
1442-number-of-operations-to-make-network-connected
1706-min-cost-to-connect-all-points
1753-path-with-minimum-effort
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2793-count-the-number-of-complete-components

Graph

0207-course-schedule
0210-course-schedule-ii
0547-number-of-provinces
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0984-most-stones-removed-with-same-row-or-column
1032-satisfiability-of-equality-equations
1442-number-of-operations-to-make-network-connected
1706-min-cost-to-connect-all-points
2090-number-of-ways-to-arrive-at-destination
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph
2793-count-the-number-of-complete-components

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
2090-number-of-ways-to-arrive-at-destination

String

0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0044-wildcard-matching
0072-edit-distance
0079-word-search
0127-word-ladder
0165-compare-version-numbers
0208-implement-trie-prefix-tree
0257-binary-tree-paths
0402-remove-k-digits
0424-longest-repeating-character-replacement
0516-longest-palindromic-subsequence
0583-delete-operation-for-two-strings
1032-satisfiability-of-equality-equations
1048-longest-string-chain
1170-shortest-common-supersequence
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
1460-number-of-substrings-containing-all-three-characters
1636-number-of-substrings-with-only-1s
1700-minimum-time-to-make-rope-colorful
1747-lexicographically-smallest-string-after-applying-operations
2137-final-value-of-variable-after-performing-operations
3043-find-the-length-of-the-longest-common-prefix
3493-maximum-number-of-operations-to-move-ones-to-the-end
3797-design-spreadsheet

Heap (Priority Queue)

0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0355-design-twitter
0621-task-scheduler
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0803-cheapest-flights-within-k-stops
1612-avoid-flood-in-the-city
1753-path-with-minimum-effort
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3678-design-task-manager

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops
2090-number-of-ways-to-arrive-at-destination

Minimum Spanning Tree

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

Dynamic Programming

0022-generate-parentheses
0042-trapping-rain-water
0044-wildcard-matching
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0085-maximal-rectangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0123-best-time-to-buy-and-sell-stock-iii
0124-binary-tree-maximum-path-sum
0188-best-time-to-buy-and-sell-stock-iv
0198-house-robber
0213-house-robber-ii
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0338-counting-bits
0368-largest-divisible-subset
0403-frog-jump
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0494-target-sum
0516-longest-palindromic-subsequence
0518-coin-change-ii
0542-01-matrix
0583-delete-operation-for-two-strings
0673-number-of-longest-increasing-subsequence
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0803-cheapest-flights-within-k-stops
0943-sum-of-subarray-minimums
1013-fibonacci-number
1048-longest-string-chain
1111-minimum-score-triangulation-of-polygon
1170-shortest-common-supersequence
1559-cherry-pickup-ii
1669-minimum-cost-to-cut-a-stick
1700-minimum-time-to-make-rope-colorful
2090-number-of-ways-to-arrive-at-destination
3437-maximum-total-damage-with-spell-casting

Linked List

0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0355-design-twitter
0445-add-two-numbers-ii
0816-design-hashset
0908-middle-of-the-linked-list
3501-delete-nodes-from-linked-list-present-in-array

Two Pointers

0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0042-trapping-rain-water
0075-sort-colors
0141-linked-list-cycle
0142-linked-list-cycle-ii
0148-sort-list
0160-intersection-of-two-linked-lists
0165-compare-version-numbers
0189-rotate-array
0234-palindrome-linked-list
0283-move-zeroes
0295-find-median-from-data-stream
0455-assign-cookies
0611-valid-triangle-number
0908-middle-of-the-linked-list
1048-longest-string-chain
2271-rearrange-array-elements-by-sign
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0037-sudoku-solver
0073-set-matrix-zeroes
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0106-construct-binary-tree-from-inorder-and-postorder-traversal
0127-word-ladder
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0169-majority-element
0208-implement-trie-prefix-tree
0268-missing-number
0347-top-k-frequent-elements
0355-design-twitter
0424-longest-repeating-character-replacement
0496-next-greater-element-i
0560-subarray-sum-equals-k
0621-task-scheduler
0816-design-hashset
0876-hand-of-straights
0893-all-nodes-distance-k-in-binary-tree
0940-fruit-into-baskets
0966-binary-subarrays-with-sum
0984-most-stones-removed-with-same-row-or-column
1029-vertical-order-traversal-of-a-binary-tree
1034-subarrays-with-k-different-integers
1048-longest-string-chain
1256-rank-transform-of-an-array
1264-maximum-number-of-words-you-can-type
1353-find-resultant-array-after-removing-anagrams
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1612-avoid-flood-in-the-city
1834-minimum-number-of-people-to-teach
2461-amount-of-time-for-binary-tree-to-be-infected
2661-smallest-missing-non-negative-integer-after-operations
3043-find-the-length-of-the-longest-common-prefix
3242-count-elements-with-maximum-frequency
3437-maximum-total-damage-with-spell-casting
3501-delete-nodes-from-linked-list-present-in-array
3581-the-two-sneaky-numbers-of-digitville
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i
3678-design-task-manager
3797-design-spreadsheet

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0094-binary-tree-inorder-traversal
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0173-binary-search-tree-iterator
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0234-palindrome-linked-list
0402-remove-k-digits
0445-add-two-numbers-ii
0496-next-greater-element-i
0503-next-greater-element-ii
0735-asteroid-collision
0937-online-stock-span
0943-sum-of-subarray-minimums
1008-construct-binary-search-tree-from-preorder-traversal
2227-sum-of-subarray-ranges

Recursion

0025-reverse-nodes-in-k-group
0044-wildcard-matching
0050-powx-n
0231-power-of-two
0234-palindrome-linked-list
1013-fibonacci-number
2050-count-good-numbers

Math

0029-divide-two-integers
0048-rotate-image
0050-powx-n
0062-unique-paths
0070-climbing-stairs
0189-rotate-array
0204-count-primes
0231-power-of-two
0268-missing-number
0368-largest-divisible-subset
0445-add-two-numbers-ii
0830-largest-triangle-area
1013-fibonacci-number
1370-count-number-of-nice-subarrays
1636-number-of-substrings-with-only-1s
2050-count-good-numbers
2324-find-triangular-sum-of-an-array
2661-smallest-missing-non-negative-integer-after-operations
3336-water-bottles-ii
3512-minimum-operations-to-make-array-sum-divisible-by-k
3581-the-two-sneaky-numbers-of-digitville

Memoization

0070-climbing-stairs
1013-fibonacci-number

Sorting

0056-merge-intervals
0075-sort-colors
0148-sort-list
0169-majority-element
0215-kth-largest-element-in-an-array
0268-missing-number
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0368-largest-divisible-subset
0435-non-overlapping-intervals
0455-assign-cookies
0611-valid-triangle-number
0621-task-scheduler
0876-hand-of-straights
1029-vertical-order-traversal-of-a-binary-tree
1048-longest-string-chain
1256-rank-transform-of-an-array
1353-find-resultant-array-after-removing-anagrams
1669-minimum-cost-to-cut-a-stick
2387-partition-array-such-that-maximum-difference-is-k
2392-successful-pairs-of-spells-and-potions
3437-maximum-total-damage-with-spell-casting

Merge Sort

0023-merge-k-sorted-lists
0148-sort-list

Bit Manipulation

0029-divide-two-integers
0078-subsets
0090-subsets-ii
0136-single-number
0137-single-number-ii
0222-count-complete-tree-nodes
0231-power-of-two
0260-single-number-iii
0268-missing-number
0338-counting-bits
2323-minimum-bit-flips-to-convert-number

Enumeration

0204-count-primes
1747-lexicographically-smallest-string-after-applying-operations

Number Theory

0204-count-primes

Design

0155-min-stack
0173-binary-search-tree-iterator
0208-implement-trie-prefix-tree
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0295-find-median-from-data-stream
0355-design-twitter
0789-kth-largest-element-in-a-stream
0816-design-hashset
0937-online-stock-span
3678-design-task-manager
3797-design-spreadsheet

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0239-sliding-window-maximum

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0402-remove-k-digits
0496-next-greater-element-i
0503-next-greater-element-ii
0937-online-stock-span
0943-sum-of-subarray-minimums
1008-construct-binary-search-tree-from-preorder-traversal
2227-sum-of-subarray-ranges

Simulation

0054-spiral-matrix
0735-asteroid-collision
2137-final-value-of-variable-after-performing-operations
2271-rearrange-array-elements-by-sign
2324-find-triangular-sum-of-an-array
2343-count-unguarded-cells-in-the-grid
3336-water-bottles-ii
3616-make-array-elements-equal-to-zero

Greedy

0011-container-with-most-water
0044-wildcard-matching
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0402-remove-k-digits
0435-non-overlapping-intervals
0455-assign-cookies
0611-valid-triangle-number
0621-task-scheduler
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0876-hand-of-straights
0890-lemonade-change
1612-avoid-flood-in-the-city
1700-minimum-time-to-make-rope-colorful
1834-minimum-number-of-people-to-teach
2387-partition-array-such-that-maximum-difference-is-k
2661-smallest-missing-non-negative-integer-after-operations
3493-maximum-number-of-operations-to-move-ones-to-the-end

Sliding Window

0003-longest-substring-without-repeating-characters
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0940-fruit-into-baskets
0966-binary-subarrays-with-sum
1034-subarrays-with-k-different-integers
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1460-number-of-substrings-containing-all-three-characters
1538-maximum-points-you-can-obtain-from-cards
3592-find-x-sum-of-all-k-long-subarrays-ii
3610-find-x-sum-of-all-k-long-subarrays-i

Monotonic Queue

0239-sliding-window-maximum

Data Stream

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

Prefix Sum

0560-subarray-sum-equals-k
0966-binary-subarrays-with-sum
1046-max-consecutive-ones-iii
1370-count-number-of-nice-subarrays
1538-maximum-points-you-can-obtain-from-cards
3383-taking-maximum-energy-from-the-mystic-dungeon
3616-make-array-elements-equal-to-zero

Counting

0169-majority-element
0347-top-k-frequent-elements
0621-task-scheduler
1034-subarrays-with-k-different-integers
3242-count-elements-with-maximum-frequency
3437-maximum-total-damage-with-spell-casting
3493-maximum-number-of-operations-to-move-ones-to-the-end

Quickselect

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

Hash Function

0816-design-hashset

Bucket Sort

0347-top-k-frequent-elements

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0037-sudoku-solver
0039-combination-sum
0040-combination-sum-ii
0051-n-queens
0078-subsets
0079-word-search
0090-subsets-ii
0216-combination-sum-iii
0257-binary-tree-paths
0494-target-sum

Combinatorics

0062-unique-paths
2324-find-triangular-sum-of-an-array

Ordered Set

3678-design-task-manager

Geometry

0830-largest-triangle-area

Iterator

0173-binary-search-tree-iterator

Trie

0208-implement-trie-prefix-tree
3043-find-the-length-of-the-longest-common-prefix

Binary Indexed Tree

0673-number-of-longest-increasing-subsequence

Segment Tree

0673-number-of-longest-increasing-subsequence

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published