Skip to content

Latest commit

 

History

1,436 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitive-Programming

A collection of LeetCode questions to ace the coding and programming skills! - Created using LeetHub v2

LeetCode Topics

Math

0002-add-two-numbers
0007-reverse-integer
0012-integer-to-roman
0013-roman-to-integer
0050-powx-n
0066-plus-one
0067-add-binary
0069-sqrtx
0096-unique-binary-search-trees
0202-happy-number
0412-fizz-buzz
0477-total-hamming-distance
0486-predict-the-winner
0633-sum-of-square-numbers
0670-maximum-swap
0877-stone-game
1140-stone-game-ii
1295-find-numbers-with-even-number-of-digits
1406-stone-game-iii
1411-convert-binary-number-in-a-linked-list-to-integer
1878-get-biggest-three-rhombus-sums-in-a-grid
1979-find-greatest-common-divisor-of-array
1993-sum-of-all-subset-xor-totals
2177-find-three-consecutive-integers-that-sum-to-a-given-number
2946-matrix-similarity-after-cyclic-shifts
2965-find-missing-and-repeated-values
3345-smallest-divisible-digit-product-i
3348-smallest-divisible-digit-product-ii
3869-smallest-index-with-digit-sum-equal-to-index
3936-split-array-by-prime-indices
4051-remove-zeros-in-decimal-representation

String

0003-longest-substring-without-repeating-characters
0008-string-to-integer-atoi
0012-integer-to-roman
0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0032-longest-valid-parentheses
0049-group-anagrams
0067-add-binary
0125-valid-palindrome
0127-word-ladder
0151-reverse-words-in-a-string
0179-largest-number
0290-word-pattern
0344-reverse-string
0345-reverse-vowels-of-a-string
0387-first-unique-character-in-a-string
0392-is-subsequence
0394-decode-string
0402-remove-k-digits
0409-longest-palindrome
0412-fizz-buzz
0424-longest-repeating-character-replacement
0443-string-compression
0541-reverse-string-ii
0567-permutation-in-string
0692-top-k-frequent-words
0844-backspace-string-compare
0856-score-of-parentheses
0937-reorder-data-in-log-files
0957-minimum-add-to-make-parentheses-valid
1108-defanging-an-ip-address
1302-delete-characters-to-make-fancy-string
1328-break-a-palindrome
1358-number-of-substrings-containing-all-three-characters
1371-minimum-remove-to-make-valid-parentheses
1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1545-find-kth-bit-in-nth-binary-string
1598-crawler-log-folder
1614-maximum-nesting-depth-of-the-parentheses
1653-minimum-deletions-to-make-string-balanced
1689-partitioning-into-minimum-number-of-deci-binary-numbers
1758-minimum-changes-to-make-alternating-binary-string
1784-check-if-binary-string-has-at-most-one-segment-of-ones
1888-minimum-number-of-flips-to-make-the-binary-string-alternating
1980-find-unique-binary-string
2042-check-if-numbers-are-ascending-in-a-sentence
2095-minimum-number-of-swaps-to-make-the-string-balanced
2124-check-if-all-as-appears-before-all-bs
2185-counting-words-with-a-given-prefix
2186-minimum-number-of-steps-to-make-two-strings-anagram-ii
2390-removing-stars-from-a-string
2573-find-the-string-with-lcp
2840-check-if-strings-can-be-made-equal-with-operations-ii
2976-minimum-cost-to-convert-string-i
3194-find-words-containing-character
3195-separate-black-and-white-balls
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3612-process-string-with-special-operations-i
3713-longest-balanced-substring-i
3732-calculate-score-after-performing-instructions
3838-weighted-word-mapping
3871-minimum-deletions-for-at-most-k-distinct-characters

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0025-reverse-nodes-in-k-group
0050-powx-n
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0394-decode-string
0486-predict-the-winner
1545-find-kth-bit-in-nth-binary-string

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0016-3sum-closest
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0036-valid-sudoku
0042-trapping-rain-water
0046-permutations
0049-group-anagrams
0053-maximum-subarray
0054-spiral-matrix
0056-merge-intervals
0059-spiral-matrix-ii
0066-plus-one
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0081-search-in-rotated-sorted-array-ii
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0130-surrounded-regions
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0179-largest-number
0200-number-of-islands
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0238-product-of-array-except-self
0283-move-zeroes
0287-find-the-duplicate-number
0406-queue-reconstruction-by-height
0414-third-maximum-number
0456-132-pattern
0477-total-hamming-distance
0486-predict-the-winner
0496-next-greater-element-i
0498-diagonal-traverse
0503-next-greater-element-ii
0542-01-matrix
0560-subarray-sum-equals-k
0611-valid-triangle-number
0643-maximum-average-subarray-i
0692-top-k-frequent-words
0695-max-area-of-island
0704-binary-search
0724-find-pivot-index
0733-flood-fill
0739-daily-temperatures
0744-find-smallest-letter-greater-than-target
0777-toeplitz-matrix
0810-valid-tic-tac-toe-state
0853-car-fleet
0875-koko-eating-bananas
0877-stone-game
0917-boats-to-save-people
0918-maximum-sum-circular-subarray
0937-reorder-data-in-log-files
0941-sort-array-by-parity
0977-squares-of-a-sorted-array
0994-rotting-oranges
1019-squares-of-a-sorted-array
1020-number-of-enclaves
1029-two-city-scheduling
1091-shortest-path-in-binary-matrix
1140-stone-game-ii
1162-as-far-from-land-as-possible
1200-minimum-absolute-difference
1235-maximum-profit-in-job-scheduling
1295-find-numbers-with-even-number-of-digits
1400-find-winner-on-a-tic-tac-toe-game
1406-stone-game-iii
1431-kids-with-the-greatest-number-of-candies
1470-shuffle-the-array
1480-running-sum-of-1d-array
1536-minimum-swaps-to-arrange-a-binary-grid
1582-special-positions-in-a-binary-matrix
1594-maximum-non-negative-product-in-a-matrix
1598-crawler-log-folder
1672-richest-customer-wealth
1710-maximum-units-on-a-truck
1727-largest-submatrix-with-rearrangements
1732-find-the-highest-altitude
1752-check-if-array-is-sorted-and-rotated
1877-minimize-maximum-pair-sum-in-array
1878-get-biggest-three-rhombus-sums-in-a-grid
1886-determine-whether-matrix-can-be-obtained-by-rotation
1929-concatenation-of-array
1979-find-greatest-common-divisor-of-array
1980-find-unique-binary-string
1984-minimum-difference-between-highest-and-lowest-of-k-scores
1993-sum-of-all-subset-xor-totals
2149-rearrange-array-elements-by-sign
2161-partition-array-according-to-given-pivot
2185-counting-words-with-a-given-prefix
2187-minimum-time-to-complete-trips
2573-find-the-string-with-lcp
2906-construct-product-matrix
2917-count-pairs-whose-sum-is-less-than-target
2946-matrix-similarity-after-cyclic-shifts
2965-find-missing-and-repeated-values
2966-divide-array-into-arrays-with-max-difference
2968-apply-operations-to-maximize-frequency-score
2976-minimum-cost-to-convert-string-i
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3194-find-words-containing-character
3212-count-submatrices-with-equal-frequency-of-x-and-y
3254-find-the-power-of-k-size-subarrays-i
3318-find-x-sum-of-all-k-long-subarrays-i
3379-transformed-array
3546-equal-sum-grid-partition-i
3548-equal-sum-grid-partition-ii
3567-minimum-absolute-difference-in-sliding-submatrix
3637-trionic-array-i
3643-flip-square-submatrix-vertically
3689-maximum-total-subarray-value-i
3718-smallest-missing-multiple-of-k
3719-longest-balanced-subarray-i
3729-count-distinct-subarrays-divisible-by-k-in-sorted-array
3731-find-missing-elements
3732-calculate-score-after-performing-instructions
3748-sort-matrix-by-diagonals
3838-weighted-word-mapping
3849-equal-sum-grid-partition-i
3869-smallest-index-with-digit-sum-equal-to-index
3936-split-array-by-prime-indices
4020-elevator-requests-i
4078-maximum-alternating-sum-of-squares

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0036-valid-sudoku
0049-group-anagrams
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0127-word-ladder
0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0169-majority-element
0202-happy-number
0219-contains-duplicate-ii
0290-word-pattern
0387-first-unique-character-in-a-string
0409-longest-palindrome
0424-longest-repeating-character-replacement
0496-next-greater-element-i
0560-subarray-sum-equals-k
0567-permutation-in-string
0692-top-k-frequent-words
1358-number-of-substrings-containing-all-three-characters
1400-find-winner-on-a-tic-tac-toe-game
1980-find-unique-binary-string
2186-minimum-number-of-steps-to-make-two-strings-anagram-ii
2840-check-if-strings-can-be-made-equal-with-operations-ii
2965-find-missing-and-repeated-values
3318-find-x-sum-of-all-k-long-subarrays-i
3548-equal-sum-grid-partition-ii
3713-longest-balanced-substring-i
3718-smallest-missing-multiple-of-k
3719-longest-balanced-subarray-i
3729-count-distinct-subarrays-divisible-by-k-in-sorted-array
3731-find-missing-elements
3732-calculate-score-after-performing-instructions
3871-minimum-deletions-for-at-most-k-distinct-characters

Matrix

0036-valid-sudoku
0054-spiral-matrix
0059-spiral-matrix-ii
0130-surrounded-regions
0200-number-of-islands
0498-diagonal-traverse
0542-01-matrix
0695-max-area-of-island
0733-flood-fill
0777-toeplitz-matrix
0810-valid-tic-tac-toe-state
0994-rotting-oranges
1020-number-of-enclaves
1091-shortest-path-in-binary-matrix
1162-as-far-from-land-as-possible
1400-find-winner-on-a-tic-tac-toe-game
1536-minimum-swaps-to-arrange-a-binary-grid
1582-special-positions-in-a-binary-matrix
1594-maximum-non-negative-product-in-a-matrix
1672-richest-customer-wealth
1727-largest-submatrix-with-rearrangements
1878-get-biggest-three-rhombus-sums-in-a-grid
1886-determine-whether-matrix-can-be-obtained-by-rotation
2573-find-the-string-with-lcp
2906-construct-product-matrix
2946-matrix-similarity-after-cyclic-shifts
2965-find-missing-and-repeated-values
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3212-count-submatrices-with-equal-frequency-of-x-and-y
3546-equal-sum-grid-partition-i
3548-equal-sum-grid-partition-ii
3567-minimum-absolute-difference-in-sliding-submatrix
3643-flip-square-submatrix-vertically
3748-sort-matrix-by-diagonals
3849-equal-sum-grid-partition-i

Enumeration

1993-sum-of-all-subset-xor-totals
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3345-smallest-divisible-digit-product-i
3546-equal-sum-grid-partition-i
3548-equal-sum-grid-partition-ii
3713-longest-balanced-substring-i
3849-equal-sum-grid-partition-i

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0560-subarray-sum-equals-k
0724-find-pivot-index
1140-stone-game-ii
1480-running-sum-of-1d-array
1732-find-the-highest-altitude
1878-get-biggest-three-rhombus-sums-in-a-grid
2906-construct-product-matrix
2968-apply-operations-to-maximize-frequency-score
3070-count-submatrices-with-top-left-element-and-sum-less-than-k
3129-find-all-possible-stable-binary-arrays-i
3130-find-all-possible-stable-binary-arrays-ii
3212-count-submatrices-with-equal-frequency-of-x-and-y
3546-equal-sum-grid-partition-i
3548-equal-sum-grid-partition-ii
3719-longest-balanced-subarray-i
3729-count-distinct-subarrays-divisible-by-k-in-sorted-array
3849-equal-sum-grid-partition-i

Greedy

0011-container-with-most-water
0179-largest-number
0402-remove-k-digits
0409-longest-palindrome
0611-valid-triangle-number
0670-maximum-swap
0917-boats-to-save-people
0957-minimum-add-to-make-parentheses-valid
1029-two-city-scheduling
1328-break-a-palindrome
1536-minimum-swaps-to-arrange-a-binary-grid
1689-partitioning-into-minimum-number-of-deci-binary-numbers
1710-maximum-units-on-a-truck
1727-largest-submatrix-with-rearrangements
1877-minimize-maximum-pair-sum-in-array
2095-minimum-number-of-swaps-to-make-the-string-balanced
2573-find-the-string-with-lcp
2966-divide-array-into-arrays-with-max-difference
3195-separate-black-and-white-balls
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3600-maximize-spanning-tree-stability-with-upgrades
3689-maximum-total-subarray-value-i
3871-minimum-deletions-for-at-most-k-distinct-characters
4078-maximum-alternating-sum-of-squares

Sorting

0015-3sum
0016-3sum-closest
0049-group-anagrams
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0169-majority-element
0179-largest-number
0406-queue-reconstruction-by-height
0414-third-maximum-number
0611-valid-triangle-number
0692-top-k-frequent-words
0853-car-fleet
0917-boats-to-save-people
0937-reorder-data-in-log-files
0941-sort-array-by-parity
0977-squares-of-a-sorted-array
1019-squares-of-a-sorted-array
1029-two-city-scheduling
1200-minimum-absolute-difference
1235-maximum-profit-in-job-scheduling
1710-maximum-units-on-a-truck
1727-largest-submatrix-with-rearrangements
1877-minimize-maximum-pair-sum-in-array
1878-get-biggest-three-rhombus-sums-in-a-grid
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2840-check-if-strings-can-be-made-equal-with-operations-ii
2917-count-pairs-whose-sum-is-less-than-target
2966-divide-array-into-arrays-with-max-difference
2968-apply-operations-to-maximize-frequency-score
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3567-minimum-absolute-difference-in-sliding-submatrix
3731-find-missing-elements
3748-sort-matrix-by-diagonals
3871-minimum-deletions-for-at-most-k-distinct-characters
4078-maximum-alternating-sum-of-squares

Counting

0169-majority-element
0387-first-unique-character-in-a-string
0692-top-k-frequent-words
2186-minimum-number-of-steps-to-make-two-strings-anagram-ii
3713-longest-balanced-substring-i
3871-minimum-deletions-for-at-most-k-distinct-characters

Simulation

0054-spiral-matrix
0059-spiral-matrix-ii
0067-add-binary
0412-fizz-buzz
0498-diagonal-traverse
0844-backspace-string-compare
1400-find-winner-on-a-tic-tac-toe-game
1545-find-kth-bit-in-nth-binary-string
1929-concatenation-of-array
2149-rearrange-array-elements-by-sign
2161-partition-array-according-to-given-pivot
2177-find-three-consecutive-integers-that-sum-to-a-given-number
2390-removing-stars-from-a-string
2946-matrix-similarity-after-cyclic-shifts
3379-transformed-array
3612-process-string-with-special-operations-i
3732-calculate-score-after-performing-instructions
3838-weighted-word-mapping
4020-elevator-requests-i
4051-remove-zeros-in-decimal-representation

Stack

0020-valid-parentheses
0032-longest-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0143-reorder-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0155-min-stack
0234-palindrome-linked-list
0341-flatten-nested-list-iterator
0394-decode-string
0402-remove-k-digits
0456-132-pattern
0496-next-greater-element-i
0503-next-greater-element-ii
0739-daily-temperatures
0844-backspace-string-compare
0853-car-fleet
0856-score-of-parentheses
0901-online-stock-span
0957-minimum-add-to-make-parentheses-valid
1371-minimum-remove-to-make-valid-parentheses
1598-crawler-log-folder
1614-maximum-nesting-depth-of-the-parentheses
1653-minimum-deletions-to-make-string-balanced
2095-minimum-number-of-swaps-to-make-the-string-balanced
2130-maximum-twin-sum-of-a-linked-list
2390-removing-stars-from-a-string

Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
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
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0341-flatten-nested-list-iterator
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0559-maximum-depth-of-n-ary-tree
0799-minimum-distance-between-bst-nodes

Depth-First Search

0094-binary-tree-inorder-traversal
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0200-number-of-islands
0226-invert-binary-tree
0341-flatten-nested-list-iterator
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0559-maximum-depth-of-n-ary-tree
0695-max-area-of-island
0733-flood-fill
0799-minimum-distance-between-bst-nodes
1020-number-of-enclaves
3310-remove-methods-from-project

Binary Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
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
0110-balanced-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0124-binary-tree-maximum-path-sum
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0226-invert-binary-tree
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0543-diameter-of-binary-tree
0799-minimum-distance-between-bst-nodes

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
0111-minimum-depth-of-binary-tree
0112-path-sum
0127-word-ladder
0130-surrounded-regions
0200-number-of-islands
0226-invert-binary-tree
0404-sum-of-left-leaves
0513-find-bottom-left-tree-value
0530-minimum-absolute-difference-in-bst
0542-01-matrix
0559-maximum-depth-of-n-ary-tree
0695-max-area-of-island
0733-flood-fill
0799-minimum-distance-between-bst-nodes
0994-rotting-oranges
1020-number-of-enclaves
1091-shortest-path-in-binary-matrix
1162-as-far-from-land-as-possible
3310-remove-methods-from-project

Two Pointers

0011-container-with-most-water
0015-3sum
0016-3sum-closest
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0042-trapping-rain-water
0061-rotate-list
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0082-remove-duplicates-from-sorted-list-ii
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0287-find-the-duplicate-number
0344-reverse-string
0345-reverse-vowels-of-a-string
0392-is-subsequence
0443-string-compression
0541-reverse-string-ii
0567-permutation-in-string
0611-valid-triangle-number
0633-sum-of-square-numbers
0844-backspace-string-compare
0908-middle-of-the-linked-list
0917-boats-to-save-people
0941-sort-array-by-parity
0977-squares-of-a-sorted-array
1019-squares-of-a-sorted-array
1877-minimize-maximum-pair-sum-in-array
2095-minimum-number-of-swaps-to-make-the-string-balanced
2095-delete-the-middle-node-of-a-linked-list
2130-maximum-twin-sum-of-a-linked-list
2149-rearrange-array-elements-by-sign
2161-partition-array-according-to-given-pivot
2216-delete-the-middle-node-of-a-linked-list
2917-count-pairs-whose-sum-is-less-than-target
3195-separate-black-and-white-balls
3302-find-the-lexicographically-smallest-valid-sequence
3643-flip-square-submatrix-vertically

Bit Manipulation

0067-add-binary
0090-subsets-ii
0287-find-the-duplicate-number
0477-total-hamming-distance
1009-complement-of-base-10-integer
1993-sum-of-all-subset-xor-totals

Backtracking

0046-permutations
0090-subsets-ii
0095-unique-binary-search-trees-ii
1415-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1980-find-unique-binary-string
1993-sum-of-all-subset-xor-totals
3348-smallest-divisible-digit-product-ii

Combinatorics

1993-sum-of-all-subset-xor-totals

Binary Search Tree

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
0069-sqrtx
0081-search-in-rotated-sorted-array-ii
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0099-recover-binary-search-tree
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0287-find-the-duplicate-number
0456-132-pattern
0530-minimum-absolute-difference-in-bst
0611-valid-triangle-number
0633-sum-of-square-numbers
0704-binary-search
0744-find-smallest-letter-greater-than-target
0799-minimum-distance-between-bst-nodes
0875-koko-eating-bananas
1235-maximum-profit-in-job-scheduling
2187-minimum-time-to-complete-trips
2917-count-pairs-whose-sum-is-less-than-target
2968-apply-operations-to-maximize-frequency-score
3600-maximize-spanning-tree-stability-with-upgrades

Dynamic Programming

0032-longest-valid-parentheses
0042-trapping-rain-water
0053-maximum-subarray
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0121-best-time-to-buy-and-sell-stock
0124-binary-tree-maximum-path-sum
0392-is-subsequence
0486-predict-the-winner
0542-01-matrix
0877-stone-game
0918-maximum-sum-circular-subarray
1140-stone-game-ii
1162-as-far-from-land-as-possible
1235-maximum-profit-in-job-scheduling
1406-stone-game-iii
1594-maximum-non-negative-product-in-a-matrix
1653-minimum-deletions-to-make-string-balanced
1888-minimum-number-of-flips-to-make-the-binary-string-alternating
2573-find-the-string-with-lcp
3129-find-all-possible-stable-binary-arrays-i
3130-find-all-possible-stable-binary-arrays-ii
3302-find-the-lexicographically-smallest-valid-sequence

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
0169-majority-element
0918-maximum-sum-circular-subarray
3719-longest-balanced-subarray-i

Linked List

0002-add-two-numbers
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0024-swap-nodes-in-pairs
0025-reverse-nodes-in-k-group
0061-rotate-list
0082-remove-duplicates-from-sorted-list-ii
0083-remove-duplicates-from-sorted-list
0092-reverse-linked-list-ii
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0143-reorder-list
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0908-middle-of-the-linked-list
1411-convert-binary-number-in-a-linked-list-to-integer
2095-delete-the-middle-node-of-a-linked-list
2130-maximum-twin-sum-of-a-linked-list
2216-delete-the-middle-node-of-a-linked-list

Heap (Priority Queue)

0023-merge-k-sorted-lists
0692-top-k-frequent-words
1878-get-biggest-three-rhombus-sums-in-a-grid
3318-find-x-sum-of-all-k-long-subarrays-i

Merge Sort

0023-merge-k-sorted-lists

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0402-remove-k-digits
0456-132-pattern
0496-next-greater-element-i
0503-next-greater-element-ii
0739-daily-temperatures
0853-car-fleet
0901-online-stock-span

Number Theory

1979-find-greatest-common-divisor-of-array
3348-smallest-divisible-digit-product-ii
3936-split-array-by-prime-indices

Sliding Window

0003-longest-substring-without-repeating-characters
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0424-longest-repeating-character-replacement
0567-permutation-in-string
0643-maximum-average-subarray-i
1358-number-of-substrings-containing-all-three-characters
1888-minimum-number-of-flips-to-make-the-binary-string-alternating
1984-minimum-difference-between-highest-and-lowest-of-k-scores
2968-apply-operations-to-maximize-frequency-score
3254-find-the-power-of-k-size-subarrays-i
3318-find-x-sum-of-all-k-long-subarrays-i

Graph Theory

2976-minimum-cost-to-convert-string-i
3310-remove-methods-from-project
3600-maximize-spanning-tree-stability-with-upgrades

Shortest Path

2976-minimum-cost-to-convert-string-i

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
2185-counting-words-with-a-given-prefix

Design

0155-min-stack
0341-flatten-nested-list-iterator
0901-online-stock-span

Queue

0341-flatten-nested-list-iterator
0387-first-unique-character-in-a-string
0918-maximum-sum-circular-subarray

Iterator

0341-flatten-nested-list-iterator

Segment Tree

0406-queue-reconstruction-by-height
3719-longest-balanced-subarray-i

Union-Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0695-max-area-of-island
1020-number-of-enclaves
2573-find-the-string-with-lcp
3600-maximize-spanning-tree-stability-with-upgrades

Minimum Spanning Tree

3600-maximize-spanning-tree-stability-with-upgrades

Monotonic Queue

0918-maximum-sum-circular-subarray

Trie

0014-longest-common-prefix
0692-top-k-frequent-words

Binary Indexed Tree

0406-queue-reconstruction-by-height

Bucket Sort

0692-top-k-frequent-words

Data Stream

0901-online-stock-span

Ordered Set

0456-132-pattern

Game Theory

0486-predict-the-winner
0877-stone-game
1140-stone-game-ii
1406-stone-game-iii

Minimax

0486-predict-the-winner
1140-stone-game-ii
1406-stone-game-iii

Zero-Sum Game

0486-predict-the-winner
1140-stone-game-ii
1406-stone-game-iii

Bidirectional Search

0127-word-ladder

Z Algorithm

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

Knuth–Morris–Pratt Algorithm

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

Boyer–Moore String-Search Algorithm

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

Database

0175-combine-two-tables
0176-second-highest-salary
0177-nth-highest-salary
0178-rank-scores
0180-consecutive-numbers
0181-employees-earning-more-than-their-managers
0182-duplicate-emails
0183-customers-who-never-order
0184-department-highest-salary
0185-department-top-three-salaries
0196-delete-duplicate-emails
0197-rising-temperature
0262-trips-and-users
0511-game-play-analysis-i

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages