Skip to content

yeahmeash/LeetcodeProblemsSolved

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

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0018-4sum
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
0037-sudoku-solver
0039-combination-sum
0042-trapping-rain-water
0046-permutations
0048-rotate-image
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0059-spiral-matrix-ii
0066-plus-one
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0080-remove-duplicates-from-sorted-array-ii
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0120-triangle
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
0136-single-number
0137-single-number-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0169-majority-element
0179-largest-number
0189-rotate-array
0200-number-of-islands
0215-kth-largest-element-in-an-array
0228-summary-ranges
0229-majority-element-ii
0239-sliding-window-maximum
0268-missing-number
0283-move-zeroes
0287-find-the-duplicate-number
0309-best-time-to-buy-and-sell-stock-with-cooldown
0322-coin-change
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0373-find-k-pairs-with-smallest-sums
0442-find-all-duplicates-in-an-array
0455-assign-cookies
0485-max-consecutive-ones
0493-reverse-pairs
0496-next-greater-element-i
0498-diagonal-traverse
0503-next-greater-element-ii
0540-single-element-in-a-sorted-array
0560-subarray-sum-equals-k
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0621-task-scheduler
0646-maximum-length-of-pair-chain
0682-baseball-game
0698-partition-to-k-equal-sum-subsets
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0717-1-bit-and-2-bit-characters
0724-find-pivot-index
0733-flood-fill
0735-asteroid-collision
0739-daily-temperatures
0759-set-intersection-size-at-least-two
0792-binary-search
0816-design-hashset
0817-design-hashmap
0890-lemonade-change
0898-transpose-matrix
0921-spiral-matrix-iii
0932-monotonic-array
0934-bitwise-ors-of-subarrays
0940-fruit-into-baskets
0945-snakes-and-ladders
1016-subarray-sums-divisible-by-k
1018-largest-perimeter-triangle
1018-binary-prefix-divisible-by-5
1019-squares-of-a-sorted-array
1036-rotting-oranges
1050-construct-binary-search-tree-from-preorder-traversal
1168-duplicate-zeros
1171-shortest-path-in-binary-matrix
1227-number-of-equivalent-domino-pairs
1262-greatest-sum-divisible-by-three
1293-three-consecutive-odds
1349-check-if-it-is-a-straight-line
1350-remove-sub-folders-from-the-filesystem
1400-find-winner-on-a-tic-tac-toe-game
1402-count-square-submatrices-with-all-ones
1426-find-n-unique-integers-sum-up-to-zero
1476-count-negative-numbers-in-a-sorted-matrix
1478-maximum-number-of-events-that-can-be-attended
1510-find-lucky-integer-in-an-array
1538-maximum-points-you-can-obtain-from-cards
1539-diagonal-traverse-ii
1574-maximum-product-of-two-elements-in-an-array
1584-average-salary-excluding-the-minimum-and-maximum-salary
1603-running-sum-of-1d-array
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1626-can-make-arithmetic-progression-from-sequence
1628-count-submatrices-with-all-ones
1635-number-of-good-pairs
1677-matrix-diagonal-sum
1753-path-with-minimum-effort
1791-richest-customer-wealth
1813-maximum-erasure-value
1826-maximum-xor-with-an-element-from-array
1851-maximum-number-of-events-that-can-be-attended-ii
1878-check-if-array-is-sorted-and-rotated
1917-maximum-average-pass-ratio
1946-minimum-absolute-sum-difference
1950-sign-of-the-product-of-an-array
1995-finding-pairs-with-a-certain-sum
2048-build-array-from-permutation
2079-delete-duplicate-folders-in-system
2102-find-the-middle-index-in-array
2144-maximum-difference-between-increasing-elements
2150-kth-smallest-product-of-two-sorted-arrays
2169-simple-bank-system
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2229-maximum-fruits-harvested-after-at-most-k-steps
2237-longest-palindrome-by-concatenating-two-letter-words
2267-minimum-difference-in-sums-after-removal-of-elements
2270-find-all-lonely-numbers-in-the-array
2320-find-all-k-distant-indices-in-an-array
2387-partition-array-such-that-maximum-difference-is-k
2400-minimum-score-after-removals-on-a-tree
2421-maximum-number-of-pairs-in-array
2432-number-of-zero-filled-subarrays
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2503-longest-subarray-with-maximum-bitwise-and
2529-range-product-queries-of-powers
2625-increment-submatrices-by-one
2720-minimize-the-maximum-difference-of-pairs
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3194-find-words-containing-character
3242-count-elements-with-maximum-frequency
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3380-shortest-subarray-with-or-at-least-k-ii
3460-count-the-number-of-inversions
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3616-make-array-elements-equal-to-zero
3627-find-minimum-time-to-reach-last-room-i
3639-zero-array-transformation-i
3647-zero-array-transformation-iii
3648-find-the-maximum-number-of-fruits-collected
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3747-maximum-difference-between-adjacent-elements-in-a-circular-array
3748-sort-matrix-by-diagonals
3788-maximum-unique-subarray-sum-after-deletion
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0037-sudoku-solver
0073-set-matrix-zeroes
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0133-clone-graph
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0169-majority-element
0202-happy-number
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0424-longest-repeating-character-replacement
0442-find-all-duplicates-in-an-array
0451-sort-characters-by-frequency
0496-next-greater-element-i
0560-subarray-sum-equals-k
0594-longest-harmonious-subsequence
0621-task-scheduler
0653-two-sum-iv-input-is-a-bst
0816-design-hashset
0817-design-hashmap
0900-reordered-power-of-2
0940-fruit-into-baskets
1016-subarray-sums-divisible-by-k
1227-number-of-equivalent-domino-pairs
1264-maximum-number-of-words-you-can-type
1400-find-winner-on-a-tic-tac-toe-game
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1813-maximum-erasure-value
1930-unique-length-3-palindromic-subsequences
1986-largest-color-value-in-a-directed-graph
1995-finding-pairs-with-a-certain-sum
2079-delete-duplicate-folders-in-system
2169-simple-bank-system
2204-find-subsequence-of-length-k-with-the-largest-sum
2237-longest-palindrome-by-concatenating-two-letter-words
2270-find-all-lonely-numbers-in-the-array
2421-maximum-number-of-pairs-in-array
2479-meeting-rooms-iii
2520-using-a-robot-to-print-the-lexicographically-smallest-string
3242-count-elements-with-maximum-frequency
3360-minimum-deletions-to-make-string-k-special
3445-lexicographically-minimum-string-after-removing-stars
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3788-maximum-unique-subarray-sum-after-deletion

Bit Manipulation

0029-divide-two-integers
0067-add-binary
0078-subsets
0090-subsets-ii
0136-single-number
0137-single-number-ii
0190-reverse-bits
0191-number-of-1-bits
0201-bitwise-and-of-numbers-range
0222-count-complete-tree-nodes
0231-power-of-two
0268-missing-number
0287-find-the-duplicate-number
0342-power-of-four
0389-find-the-difference
0698-partition-to-k-equal-sum-subsets
0934-bitwise-ors-of-subarrays
1018-binary-prefix-divisible-by-5
1826-maximum-xor-with-an-element-from-array
1930-unique-length-3-palindromic-subsequences
2400-minimum-score-after-removals-on-a-tree
2503-longest-subarray-with-maximum-bitwise-and
2529-range-product-queries-of-powers
3307-find-the-maximum-sum-of-node-values
3380-shortest-subarray-with-or-at-least-k-ii
3600-find-the-k-th-character-in-string-game-i

Sliding Window

0003-longest-substring-without-repeating-characters
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0594-longest-harmonious-subsequence
0867-new-21-game
0940-fruit-into-baskets
1538-maximum-points-you-can-obtain-from-cards
1813-maximum-erasure-value
2229-maximum-fruits-harvested-after-at-most-k-steps
3380-shortest-subarray-with-or-at-least-k-ii
3743-reschedule-meetings-for-maximum-free-time-i
3761-maximum-difference-between-even-and-odd-frequency-ii

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0006-zigzag-conversion
0008-string-to-integer-atoi
0012-integer-to-roman
0014-longest-common-prefix
0020-valid-parentheses
0022-generate-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0038-count-and-say
0043-multiply-strings
0058-length-of-last-word
0067-add-binary
0071-simplify-path
0079-word-search
0125-valid-palindrome
0131-palindrome-partitioning
0151-reverse-words-in-a-string
0165-compare-version-numbers
0179-largest-number
0242-valid-anagram
0344-reverse-string
0389-find-the-difference
0392-is-subsequence
0394-decode-string
0415-add-strings
0424-longest-repeating-character-replacement
0443-string-compression
0451-sort-characters-by-frequency
0459-repeated-substring-pattern
0647-palindromic-substrings
0657-robot-return-to-origin
0678-valid-parenthesis-string
0686-repeated-string-match
0742-to-lower-case
0812-rotate-string
0868-push-dominoes
0874-backspace-string-compare
0957-minimum-add-to-make-parentheses-valid
1058-lexicographically-smallest-equivalent-string
1078-remove-outermost-parentheses
1119-robot-bounded-in-circle
1264-maximum-number-of-words-you-can-type
1302-delete-characters-to-make-fancy-string
1350-remove-sub-folders-from-the-filesystem
1636-number-of-substrings-with-only-1s
1737-maximum-nesting-depth-of-the-parentheses
1818-maximum-score-from-removing-substrings
1894-merge-strings-alternately
1930-unique-length-3-palindromic-subsequences
2079-delete-duplicate-folders-in-system
2140-longest-subsequence-repeated-k-times
2237-longest-palindrome-by-concatenating-two-letter-words
2260-divide-a-string-into-groups-of-size-k
2346-largest-3-same-digit-number-in-string
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2887-sort-vowels-in-a-string
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3194-find-words-containing-character
3360-minimum-deletions-to-make-string-k-special
3396-valid-word
3445-lexicographically-minimum-string-after-removing-stars
3617-find-the-original-typed-string-i
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3683-find-the-lexicographically-largest-string-from-the-box-i
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes
3761-maximum-difference-between-even-and-odd-frequency-ii

Trie

0014-longest-common-prefix
0386-lexicographical-numbers
0440-k-th-smallest-in-lexicographical-order
1350-remove-sub-folders-from-the-filesystem
1826-maximum-xor-with-an-element-from-array
2079-delete-duplicate-folders-in-system

Backtracking

0022-generate-parentheses
0037-sudoku-solver
0039-combination-sum
0046-permutations
0051-n-queens
0078-subsets
0079-word-search
0090-subsets-ii
0113-path-sum-ii
0131-palindrome-partitioning
0698-partition-to-k-equal-sum-subsets
2140-longest-subsequence-repeated-k-times

Matrix

0037-sudoku-solver
0048-rotate-image
0054-spiral-matrix
0059-spiral-matrix-ii
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0200-number-of-islands
0498-diagonal-traverse
0733-flood-fill
0898-transpose-matrix
0921-spiral-matrix-iii
0945-snakes-and-ladders
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
1400-find-winner-on-a-tic-tac-toe-game
1402-count-square-submatrices-with-all-ones
1476-count-negative-numbers-in-a-sorted-matrix
1628-count-submatrices-with-all-ones
1677-matrix-diagonal-sum
1753-path-with-minimum-effort
1791-richest-customer-wealth
2625-increment-submatrices-by-one
3627-find-minimum-time-to-reach-last-room-i
3648-find-the-maximum-number-of-fruits-collected
3748-sort-matrix-by-diagonals

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0018-4sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
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
0148-sort-list
0151-reverse-words-in-a-string
0160-intersection-of-two-linked-lists
0165-compare-version-numbers
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0287-find-the-duplicate-number
0295-find-median-from-data-stream
0344-reverse-string
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0392-is-subsequence
0443-string-compression
0455-assign-cookies
0528-swapping-nodes-in-a-linked-list
0611-valid-triangle-number
0647-palindromic-substrings
0653-two-sum-iv-input-is-a-bst
0868-push-dominoes
0874-backspace-string-compare
1019-squares-of-a-sorted-array
1168-duplicate-zeros
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1894-merge-strings-alternately
2320-find-all-k-distant-indices-in-an-array
2497-maximum-matching-of-players-with-trainers
3683-find-the-lexicographically-largest-string-from-the-box-i

Sorting

0018-4sum
0056-merge-intervals
0075-sort-colors
0088-merge-sorted-array
0148-sort-list
0169-majority-element
0179-largest-number
0215-kth-largest-element-in-an-array
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0295-find-median-from-data-stream
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0389-find-the-difference
0451-sort-characters-by-frequency
0455-assign-cookies
0594-longest-harmonious-subsequence
0611-valid-triangle-number
0621-task-scheduler
0646-maximum-length-of-pair-chain
0759-set-intersection-size-at-least-two
0900-reordered-power-of-2
1018-largest-perimeter-triangle
1019-squares-of-a-sorted-array
1262-greatest-sum-divisible-by-three
1478-maximum-number-of-events-that-can-be-attended
1539-diagonal-traverse-ii
1574-maximum-product-of-two-elements-in-an-array
1584-average-salary-excluding-the-minimum-and-maximum-salary
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1626-can-make-arithmetic-progression-from-sequence
1851-maximum-number-of-events-that-can-be-attended-ii
1946-minimum-absolute-sum-difference
2180-maximum-number-of-tasks-you-can-assign
2204-find-subsequence-of-length-k-with-the-largest-sum
2387-partition-array-such-that-maximum-difference-is-k
2479-meeting-rooms-iii
2497-maximum-matching-of-players-with-trainers
2887-sort-vowels-in-a-string
3307-find-the-maximum-sum-of-node-values
3321-type-of-triangle
3360-minimum-deletions-to-make-string-k-special
3647-zero-array-transformation-iii
3748-sort-matrix-by-diagonals

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
0108-convert-sorted-array-to-binary-search-tree
0148-sort-list
0169-majority-element
0190-reverse-bits
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0493-reverse-pairs

Counting

0169-majority-element
0229-majority-element-ii
0347-top-k-frequent-elements
0451-sort-characters-by-frequency
0594-longest-harmonious-subsequence
0621-task-scheduler
0900-reordered-power-of-2
1227-number-of-equivalent-domino-pairs
1510-find-lucky-integer-in-an-array
1635-number-of-good-pairs
1986-largest-color-value-in-a-directed-graph
2140-longest-subsequence-repeated-k-times
2237-longest-palindrome-by-concatenating-two-letter-words
2270-find-all-lonely-numbers-in-the-array
2421-maximum-number-of-pairs-in-array
3242-count-elements-with-maximum-frequency
3360-minimum-deletions-to-make-string-k-special
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3753-maximum-difference-between-even-and-odd-frequency-i
3754-maximum-manhattan-distance-after-k-changes

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0222-count-complete-tree-nodes
0268-missing-number
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0493-reverse-pairs
0540-single-element-in-a-sorted-array
0611-valid-triangle-number
0792-binary-search
1476-count-negative-numbers-in-a-sorted-matrix
1621-number-of-subsequences-that-satisfy-the-given-sum-condition
1753-path-with-minimum-effort
1851-maximum-number-of-events-that-can-be-attended-ii
1946-minimum-absolute-sum-difference
2150-kth-smallest-product-of-two-sorted-arrays
2180-maximum-number-of-tasks-you-can-assign
2229-maximum-fruits-harvested-after-at-most-k-steps
2720-minimize-the-maximum-difference-of-pairs
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Greedy

0011-container-with-most-water
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0179-largest-number
0455-assign-cookies
0611-valid-triangle-number
0621-task-scheduler
0646-maximum-length-of-pair-chain
0678-valid-parenthesis-string
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0759-set-intersection-size-at-least-two
0890-lemonade-change
0957-minimum-add-to-make-parentheses-valid
1018-largest-perimeter-triangle
1262-greatest-sum-divisible-by-three
1478-maximum-number-of-events-that-can-be-attended
1529-max-difference-you-can-get-from-changing-an-integer
1818-maximum-score-from-removing-substrings
1917-maximum-average-pass-ratio
2140-longest-subsequence-repeated-k-times
2180-maximum-number-of-tasks-you-can-assign
2237-longest-palindrome-by-concatenating-two-letter-words
2387-partition-array-such-that-maximum-difference-is-k
2497-maximum-matching-of-players-with-trainers
2520-using-a-robot-to-print-the-lexicographically-smallest-string
2704-maximum-difference-by-remapping-a-digit
2720-minimize-the-maximum-difference-of-pairs
3143-longest-unequal-adjacent-groups-subsequence-i
3171-minimum-equal-sum-of-two-arrays-after-replacing-zeros
3307-find-the-maximum-sum-of-node-values
3360-minimum-deletions-to-make-string-k-special
3445-lexicographically-minimum-string-after-removing-stars
3647-zero-array-transformation-iii
3741-reschedule-meetings-for-maximum-free-time-ii
3743-reschedule-meetings-for-maximum-free-time-i
3788-maximum-unique-subarray-sum-after-deletion

Queue

0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0239-sliding-window-maximum
2180-maximum-number-of-tasks-you-can-assign

Monotonic Queue

0239-sliding-window-maximum
2180-maximum-number-of-tasks-you-can-assign

Simulation

0043-multiply-strings
0054-spiral-matrix
0059-spiral-matrix-ii
0067-add-binary
0415-add-strings
0498-diagonal-traverse
0657-robot-return-to-origin
0682-baseball-game
0735-asteroid-collision
0874-backspace-string-compare
0898-transpose-matrix
0921-spiral-matrix-iii
1119-robot-bounded-in-circle
1400-find-winner-on-a-tic-tac-toe-game
1642-water-bottles
2048-build-array-from-permutation
2169-simple-bank-system
2260-divide-a-string-into-groups-of-size-k
2479-meeting-rooms-iii
3336-water-bottles-ii
3600-find-the-k-th-character-in-string-game-i
3616-make-array-elements-equal-to-zero
3790-fruits-into-baskets-ii

Graph

0133-clone-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
1442-number-of-operations-to-make-network-connected
1986-largest-color-value-in-a-directed-graph
2438-find-closest-node-to-given-two-nodes
3627-find-minimum-time-to-reach-last-room-i

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
0373-find-k-pairs-with-smallest-sums
0451-sort-characters-by-frequency
0621-task-scheduler
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0803-cheapest-flights-within-k-stops
1478-maximum-number-of-events-that-can-be-attended
1539-diagonal-traverse-ii
1574-maximum-product-of-two-elements-in-an-array
1753-path-with-minimum-effort
1917-maximum-average-pass-ratio
2204-find-subsequence-of-length-k-with-the-largest-sum
2267-minimum-difference-in-sums-after-removal-of-elements
2479-meeting-rooms-iii
3445-lexicographically-minimum-string-after-removing-stars
3627-find-minimum-time-to-reach-last-room-i
3647-zero-array-transformation-iii

Shortest Path

0744-network-delay-time
0803-cheapest-flights-within-k-stops
3627-find-minimum-time-to-reach-last-room-i

Math

0002-add-two-numbers
0009-palindrome-number
0012-integer-to-roman
0029-divide-two-integers
0043-multiply-strings
0048-rotate-image
0050-powx-n
0060-permutation-sequence
0062-unique-paths
0066-plus-one
0067-add-binary
0069-sqrtx
0070-climbing-stairs
0189-rotate-array
0202-happy-number
0231-power-of-two
0268-missing-number
0326-power-of-three
0342-power-of-four
0415-add-strings
0445-add-two-numbers-ii
0593-valid-square
0826-soup-servings
0867-new-21-game
0900-reordered-power-of-2
1013-fibonacci-number
1018-largest-perimeter-triangle
1119-robot-bounded-in-circle
1289-day-of-the-week
1349-check-if-it-is-a-straight-line
1411-convert-binary-number-in-a-linked-list-to-integer
1426-find-n-unique-integers-sum-up-to-zero
1529-max-difference-you-can-get-from-changing-an-integer
1630-count-odd-numbers-in-an-interval-range
1635-number-of-good-pairs
1636-number-of-substrings-with-only-1s
1642-water-bottles
1950-sign-of-the-product-of-an-array
2432-number-of-zero-filled-subarrays
2704-maximum-difference-by-remapping-a-digit
3172-divisible-and-non-divisible-sums-difference
3279-alice-and-bob-playing-flower-game
3321-type-of-triangle
3336-water-bottles-ii
3600-find-the-k-th-character-in-string-game-i
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3754-maximum-manhattan-distance-after-k-changes
3830-find-closest-person

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0042-trapping-rain-water
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0118-pascals-triangle
0120-triangle
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
0131-palindrome-partitioning
0309-best-time-to-buy-and-sell-stock-with-cooldown
0322-coin-change
0392-is-subsequence
0646-maximum-length-of-pair-chain
0647-palindromic-substrings
0678-valid-parenthesis-string
0698-partition-to-k-equal-sum-subsets
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0803-cheapest-flights-within-k-stops
0806-domino-and-tromino-tiling
0826-soup-servings
0867-new-21-game
0868-push-dominoes
0934-bitwise-ors-of-subarrays
1013-fibonacci-number
1262-greatest-sum-divisible-by-three
1402-count-square-submatrices-with-all-ones
1628-count-submatrices-with-all-ones
1851-maximum-number-of-events-that-can-be-attended-ii
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete
2061-painting-a-grid-with-three-different-colors
2267-minimum-difference-in-sums-after-removal-of-elements
2882-ways-to-express-an-integer-as-sum-of-powers
3142-longest-unequal-adjacent-groups-subsequence-ii
3143-longest-unequal-adjacent-groups-subsequence-i
3307-find-the-maximum-sum-of-node-values
3460-count-the-number-of-inversions
3490-find-the-maximum-length-of-valid-subsequence-i
3491-find-the-maximum-length-of-valid-subsequence-ii
3629-total-characters-in-string-after-transformations-i
3630-total-characters-in-string-after-transformations-ii
3648-find-the-maximum-number-of-fruits-collected

Quickselect

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

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0459-repeated-substring-pattern
0686-repeated-string-match
0812-rotate-string

Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0113-path-sum-ii
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
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1050-construct-binary-search-tree-from-preorder-traversal
2400-minimum-score-after-removals-on-a-tree
3307-find-the-maximum-sum-of-node-values
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Depth-First Search

0079-word-search
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0112-path-sum
0113-path-sum-ii
0124-binary-tree-maximum-path-sum
0133-clone-graph
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0386-lexicographical-numbers
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0733-flood-fill
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
1350-remove-sub-folders-from-the-filesystem
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort
2400-minimum-score-after-removals-on-a-tree
2438-find-closest-node-to-given-two-nodes
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

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
0112-path-sum
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0322-coin-change
0547-number-of-provinces
0653-two-sum-iv-input-is-a-bst
0733-flood-fill
0744-network-delay-time
0801-is-graph-bipartite
0803-cheapest-flights-within-k-stops
0820-find-eventual-safe-states
0945-snakes-and-ladders
1036-rotting-oranges
1171-shortest-path-in-binary-matrix
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i
3645-maximize-the-number-of-target-nodes-after-connecting-trees-ii

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0112-path-sum
0113-path-sum-ii
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
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0236-lowest-common-ancestor-of-a-binary-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1050-construct-binary-search-tree-from-preorder-traversal

Binary Search Tree

0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0173-binary-search-tree-iterator
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0653-two-sum-iv-input-is-a-bst
0783-search-in-a-binary-search-tree
0784-insert-into-a-binary-search-tree
0789-kth-largest-element-in-a-stream
1050-construct-binary-search-tree-from-preorder-traversal

Memoization

0070-climbing-stairs
0698-partition-to-k-equal-sum-subsets
1013-fibonacci-number
1986-largest-color-value-in-a-directed-graph
2028-the-earliest-and-latest-rounds-where-players-compete

Stack

0020-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0084-largest-rectangle-in-histogram
0143-reorder-list
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
0394-decode-string
0445-add-two-numbers-ii
0496-next-greater-element-i
0503-next-greater-element-ii
0678-valid-parenthesis-string
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0874-backspace-string-compare
0937-online-stock-span
0957-minimum-add-to-make-parentheses-valid
1050-construct-binary-search-tree-from-preorder-traversal
1078-remove-outermost-parentheses
1628-count-submatrices-with-all-ones
1737-maximum-nesting-depth-of-the-parentheses
1818-maximum-score-from-removing-substrings
2520-using-a-robot-to-print-the-lexicographically-smallest-string
3445-lexicographically-minimum-string-after-removing-stars

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0496-next-greater-element-i
0503-next-greater-element-ii
0739-daily-temperatures
0937-online-stock-span
1050-construct-binary-search-tree-from-preorder-traversal
1628-count-submatrices-with-all-ones

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0050-powx-n
0060-permutation-sequence
0143-reorder-list
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0326-power-of-three
0342-power-of-four
0394-decode-string
1013-fibonacci-number
3600-find-the-k-th-character-in-string-game-i

Prefix Sum

0560-subarray-sum-equals-k
0724-find-pivot-index
1016-subarray-sums-divisible-by-k
1538-maximum-points-you-can-obtain-from-cards
1603-running-sum-of-1d-array
1930-unique-length-3-palindromic-subsequences
2102-find-the-middle-index-in-array
2229-maximum-fruits-harvested-after-at-most-k-steps
2529-range-product-queries-of-powers
2625-increment-submatrices-by-one
3616-make-array-elements-equal-to-zero
3639-zero-array-transformation-i
3647-zero-array-transformation-iii
3761-maximum-difference-between-even-and-odd-frequency-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0820-find-eventual-safe-states
1986-largest-color-value-in-a-directed-graph

Enumeration

0900-reordered-power-of-2
2140-longest-subsequence-repeated-k-times
3683-find-the-lexicographically-largest-string-from-the-box-i
3741-reschedule-meetings-for-maximum-free-time-ii
3761-maximum-difference-between-even-and-odd-frequency-ii
3789-maximize-subarrays-after-removing-one-conflicting-pair

Union Find

0200-number-of-islands
0547-number-of-provinces
0801-is-graph-bipartite
1058-lexicographically-smallest-equivalent-string
1442-number-of-operations-to-make-network-connected
1753-path-with-minimum-effort

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
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
0148-sort-list
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0237-delete-node-in-a-linked-list
0328-odd-even-linked-list
0445-add-two-numbers-ii
0528-swapping-nodes-in-a-linked-list
0816-design-hashset
0817-design-hashmap
1411-convert-binary-number-in-a-linked-list-to-integer

Merge Sort

0023-merge-k-sorted-lists
0148-sort-list
0493-reverse-pairs

Ordered Set

0493-reverse-pairs
1946-minimum-absolute-sum-difference
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Design

0155-min-stack
0173-binary-search-tree-iterator
0225-implement-stack-using-queues
0232-implement-queue-using-stacks
0295-find-median-from-data-stream
0789-kth-largest-element-in-a-stream
0816-design-hashset
0817-design-hashmap
0937-online-stock-span
1995-finding-pairs-with-a-certain-sum
2169-simple-bank-system

Database

1908-recyclable-and-low-fat-products

Data Stream

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

Binary Indexed Tree

0493-reverse-pairs

Segment Tree

0493-reverse-pairs
3789-maximize-subarrays-after-removing-one-conflicting-pair
3790-fruits-into-baskets-ii
3791-fruits-into-baskets-iii

Combinatorics

0062-unique-paths

Geometry

0593-valid-square
1349-check-if-it-is-a-straight-line

Hash Function

0816-design-hashset
0817-design-hashmap
2079-delete-duplicate-folders-in-system

Brainteaser

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

Probability and Statistics

0826-soup-servings
0867-new-21-game

Bitmask

0698-partition-to-k-equal-sum-subsets

Iterator

0173-binary-search-tree-iterator

Bucket Sort

0347-top-k-frequent-elements
0451-sort-characters-by-frequency

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published