Skip to content
MaikonrooniePublic

About

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2,405 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

Collection of LeetCode questions to ace the coding interview! - Created using LeetHub

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0033-search-in-rotated-sorted-array
0035-search-insert-position
0036-valid-sudoku
0037-sudoku-solver
0041-first-missing-positive
0042-trapping-rain-water
0045-jump-game-ii
0049-group-anagrams
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0059-spiral-matrix-ii
0066-plus-one
0074-search-a-2d-matrix
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0108-convert-sorted-array-to-binary-search-tree
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0135-candy
0136-single-number
0139-word-break
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0164-maximum-gap
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0198-house-robber
0200-number-of-islands
0213-house-robber-ii
0217-contains-duplicate
0219-contains-duplicate-ii
0221-maximal-square
0228-summary-ranges
0229-majority-element-ii
0238-product-of-array-except-self
0239-sliding-window-maximum
0268-missing-number
0283-move-zeroes
0300-longest-increasing-subsequence
0303-range-sum-query-immutable
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0321-create-maximum-number
0322-coin-change
0324-wiggle-sort-ii
0329-longest-increasing-path-in-a-matrix
0330-patching-array
0347-top-k-frequent-elements
0354-russian-doll-envelopes
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0474-ones-and-zeroes
0485-max-consecutive-ones
0486-predict-the-winner
0494-target-sum
0498-diagonal-traverse
0502-ipo
0506-relative-ranks
0517-super-washing-machines
0518-coin-change-ii
0526-beautiful-arrangement
0560-subarray-sum-equals-k
0561-array-partition
0611-valid-triangle-number
0630-course-schedule-iii
0632-smallest-range-covering-elements-from-k-lists
0638-shopping-offers
0645-set-mismatch
0682-baseball-game
0695-max-area-of-island
0717-1-bit-and-2-bit-characters
0735-asteroid-collision
0739-daily-temperatures
0747-min-cost-climbing-stairs
0759-set-intersection-size-at-least-two
0777-toeplitz-matrix
0779-max-chunks-to-make-sorted-ii
0792-binary-search
0794-swim-in-rising-water
0823-split-array-with-same-average
0830-largest-triangle-area
0876-hand-of-straights
0881-boats-to-save-people
0883-car-fleet
0887-minimum-cost-to-hire-k-workers
0902-minimum-number-of-refueling-stops
0907-koko-eating-bananas
0912-sort-an-array
0921-spiral-matrix-iii
0944-delete-columns-to-make-sorted
0955-delete-columns-to-make-sorted-ii
0960-delete-columns-to-make-sorted-iii
0961-n-repeated-element-in-size-2n-array
0994-rotting-oranges
1006-vowel-spellchecker
1018-largest-perimeter-triangle
1018-binary-prefix-divisible-by-5
1036-rotting-oranges
1039-find-the-town-judge
1127-last-stone-weight
1262-greatest-sum-divisible-by-three
1351-count-negative-numbers-in-a-sorted-matrix
1365-how-many-numbers-are-smaller-than-the-current-number
1441-build-an-array-with-stack-operations
1451-minimum-number-of-taps-to-open-to-water-a-garden
1463-the-k-weakest-rows-in-a-matrix
1470-shuffle-the-array
1480-running-sum-of-1d-array
1503-reducing-dishes
1539-diagonal-traverse-ii
1548-check-if-all-1s-are-at-least-length-k-places-away
1574-maximum-product-of-two-elements-in-an-array
1586-longest-subarray-of-1s-after-deleting-one-element
1590-make-sum-divisible-by-p
1612-avoid-flood-in-the-city
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1726-tuple-with-same-product
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
1929-concatenation-of-array
1993-sum-of-all-subset-xor-totals
2026-merge-triplets-to-form-target-triplet
2032-two-out-of-three
2054-two-best-non-overlapping-events
2110-number-of-smooth-descent-periods-of-a-stock
2114-minimum-number-of-work-sessions-to-finish-the-tasks
2141-maximum-running-time-of-n-computers
2274-keep-multiplying-found-values-by-two
2307-replace-non-coprime-numbers-in-array
2392-successful-pairs-of-spells-and-potions
2402-meeting-rooms-iii
2429-design-a-food-rating-system
2432-number-of-zero-filled-subarrays
2475-number-of-unequal-triplets-in-array
2497-maximum-matching-of-players-with-trainers
2502-sort-the-people
2564-most-profitable-path-in-a-tree
2605-form-smallest-number-from-two-digit-arrays
2625-increment-submatrices-by-one
2661-smallest-missing-non-negative-integer-after-operations
2681-put-marbles-in-bags
2685-first-completely-painted-row-or-column
2725-mice-and-cheese
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
2859-sum-of-values-at-indices-with-k-set-bits
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3242-count-elements-with-maximum-frequency
3251-maximum-area-of-longest-diagonal-rectangle
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3381-maximum-subarray-sum-with-length-divisible-by-k
3387-minimum-operations-to-make-median-of-array-equal-to-k
3388-right-triangles
3432-count-partitions-with-even-sum-difference
3433-count-mentions-per-user
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3483-unique-3-digit-even-numbers
3490-find-the-maximum-length-of-valid-subsequence-i
3512-minimum-operations-to-make-array-sum-divisible-by-k
3531-count-covered-buildings
3562-maximum-profit-from-trading-stocks-with-discounts
3577-count-the-number-of-computer-unlocking-permutations
3583-count-special-triplets
3606-coupon-code-validator
3610-find-x-sum-of-all-k-long-subarrays-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3652-best-time-to-buy-and-sell-stock-using-strategy
3733-length-of-longest-v-shaped-diagonal-segment
3748-sort-matrix-by-diagonals
3788-maximum-unique-subarray-sum-after-deletion
3791-fruits-into-baskets-iii
3797-design-spreadsheet
3864-count-the-number-of-computer-unlocking-permutations
3866-first-unique-even-element

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0013-roman-to-integer
0036-valid-sudoku
0037-sudoku-solver
0041-first-missing-positive
0049-group-anagrams
0128-longest-consecutive-sequence
0133-clone-graph
0139-word-break
0141-linked-list-cycle
0169-majority-element
0202-happy-number
0217-contains-duplicate
0219-contains-duplicate-ii
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0389-find-the-difference
0424-longest-repeating-character-replacement
0448-find-all-numbers-disappeared-in-an-array
0560-subarray-sum-equals-k
0632-smallest-range-covering-elements-from-k-lists
0645-set-mismatch
0768-partition-labels
0807-custom-sort-string
0876-hand-of-straights
0961-n-repeated-element-in-size-2n-array
1006-vowel-spellchecker
1015-smallest-integer-divisible-by-k
1039-find-the-town-judge
1264-maximum-number-of-words-you-can-type
1365-how-many-numbers-are-smaller-than-the-current-number
1590-make-sum-divisible-by-p
1612-avoid-flood-in-the-city
1624-largest-substring-between-two-equal-characters
1726-tuple-with-same-product
1834-minimum-number-of-people-to-teach
2032-two-out-of-three
2103-rings-and-rods
2274-keep-multiplying-found-values-by-two
2402-meeting-rooms-iii
2429-design-a-food-rating-system
2475-number-of-unequal-triplets-in-array
2502-sort-the-people
2599-take-k-of-each-character-from-left-and-right
2605-form-smallest-number-from-two-digit-arrays
2661-smallest-missing-non-negative-integer-after-operations
2685-first-completely-painted-row-or-column
2729-check-if-the-number-is-fascinating
3120-count-the-number-of-special-characters-i
3242-count-elements-with-maximum-frequency
3381-maximum-subarray-sum-with-length-divisible-by-k
3388-right-triangles
3483-unique-3-digit-even-numbers
3531-count-covered-buildings
3583-count-special-triplets
3606-coupon-code-validator
3610-find-x-sum-of-all-k-long-subarrays-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3678-design-task-manager
3788-maximum-unique-subarray-sum-after-deletion
3797-design-spreadsheet
3866-first-unique-even-element
3872-find-most-frequent-vowel-and-consonant

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0027-remove-element
0031-next-permutation
0042-trapping-rain-water
0061-rotate-list
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0082-remove-duplicates-from-sorted-list-ii
0086-partition-list
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0165-compare-version-numbers
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0202-happy-number
0234-palindrome-linked-list
0283-move-zeroes
0321-create-maximum-number
0344-reverse-string
0455-assign-cookies
0611-valid-triangle-number
0647-palindromic-substrings
0680-valid-palindrome-ii
0768-partition-labels
0881-boats-to-save-people
1768-merge-strings-alternately
2392-successful-pairs-of-spells-and-potions
2497-maximum-matching-of-players-with-trainers

Math

0002-add-two-numbers
0009-palindrome-number
0013-roman-to-integer
0050-powx-n
0062-unique-paths
0066-plus-one
0070-climbing-stairs
0096-unique-binary-search-trees
0150-evaluate-reverse-polish-notation
0189-rotate-array
0202-happy-number
0231-power-of-two
0268-missing-number
0342-power-of-four
0464-can-i-win
0486-predict-the-winner
0507-perfect-number
0823-split-array-with-same-average
0830-largest-triangle-area
0867-new-21-game
1013-fibonacci-number
1015-smallest-integer-divisible-by-k
1018-largest-perimeter-triangle
1440-convert-integer-to-the-sum-of-two-no-zero-integers
1448-maximum-69-number
1523-count-odd-numbers-in-an-interval-range
1636-number-of-substrings-with-only-1s
1642-water-bottles
1817-calculate-money-in-leetcode-bank
1925-count-square-sum-triples
1993-sum-of-all-subset-xor-totals
2110-number-of-smooth-descent-periods-of-a-stock
2147-number-of-ways-to-divide-a-long-corridor
2307-replace-non-coprime-numbers-in-array
2432-number-of-zero-filled-subarrays
2661-smallest-missing-non-negative-integer-after-operations
2729-check-if-the-number-is-fascinating
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1
3172-divisible-and-non-divisible-sums-difference
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3199-distribute-candies-among-children-i
3201-distribute-candies-among-children-ii
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3279-alice-and-bob-playing-flower-game
3336-water-bottles-ii
3388-right-triangles
3432-count-partitions-with-even-sum-difference
3433-count-mentions-per-user
3462-vowels-game-in-a-string
3512-minimum-operations-to-make-array-sum-divisible-by-k
3577-count-the-number-of-computer-unlocking-permutations
3600-find-the-k-th-character-in-string-game-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3864-count-the-number-of-computer-unlocking-permutations

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0010-regular-expression-matching
0013-roman-to-integer
0014-longest-common-prefix
0020-valid-parentheses
0022-generate-parentheses
0044-wildcard-matching
0049-group-anagrams
0071-simplify-path
0072-edit-distance
0091-decode-ways
0097-interleaving-string
0115-distinct-subsequences
0125-valid-palindrome
0139-word-break
0165-compare-version-numbers
0242-valid-anagram
0344-reverse-string
0389-find-the-difference
0420-strong-password-checker
0424-longest-repeating-character-replacement
0474-ones-and-zeroes
0647-palindromic-substrings
0678-valid-parenthesis-string
0680-valid-palindrome-ii
0768-partition-labels
0807-custom-sort-string
0944-delete-columns-to-make-sorted
0955-delete-columns-to-make-sorted-ii
0960-delete-columns-to-make-sorted-iii
0973-stamping-the-sequence
1006-vowel-spellchecker
1159-smallest-subsequence-of-distinct-characters
1250-longest-common-subsequence
1264-maximum-number-of-words-you-can-type
1624-largest-substring-between-two-equal-characters
1636-number-of-substrings-with-only-1s
1652-minimum-suffix-flips
1768-merge-strings-alternately
2103-rings-and-rods
2147-number-of-ways-to-divide-a-long-corridor
2211-count-collisions-on-a-road
2429-design-a-food-rating-system
2483-minimum-penalty-for-a-shop
2502-sort-the-people
2599-take-k-of-each-character-from-left-and-right
2887-sort-vowels-in-a-string
3120-count-the-number-of-special-characters-i
3462-vowels-game-in-a-string
3479-count-the-number-of-substrings-with-dominant-ones
3493-maximum-number-of-operations-to-move-ones-to-the-end
3606-coupon-code-validator
3797-design-spreadsheet
3856-trim-trailing-vowels
3872-find-most-frequent-vowel-and-consonant

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0035-search-insert-position
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0268-missing-number
0300-longest-increasing-subsequence
0354-russian-doll-envelopes
0611-valid-triangle-number
0792-binary-search
0794-swim-in-rising-water
0907-koko-eating-bananas
1351-count-negative-numbers-in-a-sorted-matrix
1463-the-k-weakest-rows-in-a-matrix
1612-avoid-flood-in-the-city
2054-two-best-non-overlapping-events
2141-maximum-running-time-of-n-computers
2392-successful-pairs-of-spells-and-potions
3791-fruits-into-baskets-iii

Sorting

0015-3sum
0018-4sum
0049-group-anagrams
0075-sort-colors
0088-merge-sorted-array
0164-maximum-gap
0169-majority-element
0217-contains-duplicate
0229-majority-element-ii
0242-valid-anagram
0268-missing-number
0324-wiggle-sort-ii
0347-top-k-frequent-elements
0354-russian-doll-envelopes
0389-find-the-difference
0455-assign-cookies
0502-ipo
0506-relative-ranks
0561-array-partition
0611-valid-triangle-number
0630-course-schedule-iii
0632-smallest-range-covering-elements-from-k-lists
0645-set-mismatch
0759-set-intersection-size-at-least-two
0779-max-chunks-to-make-sorted-ii
0807-custom-sort-string
0876-hand-of-straights
0881-boats-to-save-people
0883-car-fleet
0887-minimum-cost-to-hire-k-workers
0912-sort-an-array
1018-largest-perimeter-triangle
1262-greatest-sum-divisible-by-three
1365-how-many-numbers-are-smaller-than-the-current-number
1463-the-k-weakest-rows-in-a-matrix
1503-reducing-dishes
1539-diagonal-traverse-ii
1574-maximum-product-of-two-elements-in-an-array
2054-two-best-non-overlapping-events
2092-find-all-people-with-secret
2141-maximum-running-time-of-n-computers
2274-keep-multiplying-found-values-by-two
2392-successful-pairs-of-spells-and-potions
2402-meeting-rooms-iii
2475-number-of-unequal-triplets-in-array
2497-maximum-matching-of-players-with-trainers
2502-sort-the-people
2681-put-marbles-in-bags
2725-mice-and-cheese
2887-sort-vowels-in-a-string
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3387-minimum-operations-to-make-median-of-array-equal-to-k
3433-count-mentions-per-user
3531-count-covered-buildings
3606-coupon-code-validator
3748-sort-matrix-by-diagonals

Dynamic Programming

0005-longest-palindromic-substring
0010-regular-expression-matching
0022-generate-parentheses
0042-trapping-rain-water
0044-wildcard-matching
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0072-edit-distance
0091-decode-ways
0096-unique-binary-search-trees
0097-interleaving-string
0115-distinct-subsequences
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0221-maximal-square
0300-longest-increasing-subsequence
0309-best-time-to-buy-and-sell-stock-with-cooldown
0312-burst-balloons
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0354-russian-doll-envelopes
0416-partition-equal-subset-sum
0464-can-i-win
0474-ones-and-zeroes
0486-predict-the-winner
0494-target-sum
0518-coin-change-ii
0526-beautiful-arrangement
0638-shopping-offers
0647-palindromic-substrings
0678-valid-parenthesis-string
0747-min-cost-climbing-stairs
0823-split-array-with-same-average
0863-sum-of-distances-in-tree
0867-new-21-game
0877-shortest-path-visiting-all-nodes
0902-minimum-number-of-refueling-stops
0960-delete-columns-to-make-sorted-iii
1013-fibonacci-number
1250-longest-common-subsequence
1262-greatest-sum-divisible-by-three
1451-minimum-number-of-taps-to-open-to-water-a-garden
1503-reducing-dishes
1586-longest-subarray-of-1s-after-deleting-one-element
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
2054-two-best-non-overlapping-events
2110-number-of-smooth-descent-periods-of-a-stock
2114-minimum-number-of-work-sessions-to-finish-the-tasks
2147-number-of-ways-to-divide-a-long-corridor
2408-number-of-people-aware-of-a-secret
3490-find-the-maximum-length-of-valid-subsequence-i
3562-maximum-profit-from-trading-stocks-with-discounts
3733-length-of-longest-v-shaped-diagonal-segment

Bit Manipulation

0136-single-number
0231-power-of-two
0268-missing-number
0342-power-of-four
0389-find-the-difference
0464-can-i-win
0526-beautiful-arrangement
0638-shopping-offers
0645-set-mismatch
0823-split-array-with-same-average
0877-shortest-path-visiting-all-nodes
1018-binary-prefix-divisible-by-5
1993-sum-of-all-subset-xor-totals
2032-two-out-of-three
2114-minimum-number-of-work-sessions-to-finish-the-tasks
2859-sum-of-values-at-indices-with-k-set-bits
3600-find-the-k-th-character-in-string-game-i

Greedy

0011-container-with-most-water
0044-wildcard-matching
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0134-gas-station
0135-candy
0321-create-maximum-number
0324-wiggle-sort-ii
0330-patching-array
0420-strong-password-checker
0455-assign-cookies
0502-ipo
0517-super-washing-machines
0561-array-partition
0611-valid-triangle-number
0630-course-schedule-iii
0632-smallest-range-covering-elements-from-k-lists
0678-valid-parenthesis-string
0680-valid-palindrome-ii
0759-set-intersection-size-at-least-two
0768-partition-labels
0770-couples-holding-hands
0779-max-chunks-to-make-sorted-ii
0876-hand-of-straights
0881-boats-to-save-people
0887-minimum-cost-to-hire-k-workers
0902-minimum-number-of-refueling-stops
0955-delete-columns-to-make-sorted-ii
0973-stamping-the-sequence
1018-largest-perimeter-triangle
1159-smallest-subsequence-of-distinct-characters
1262-greatest-sum-divisible-by-three
1448-maximum-69-number
1451-minimum-number-of-taps-to-open-to-water-a-garden
1503-reducing-dishes
1612-avoid-flood-in-the-city
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
1652-minimum-suffix-flips
1834-minimum-number-of-people-to-teach
1917-maximum-average-pass-ratio
2026-merge-triplets-to-form-target-triplet
2141-maximum-running-time-of-n-computers
2497-maximum-matching-of-players-with-trainers
2661-smallest-missing-non-negative-integer-after-operations
2681-put-marbles-in-bags
2725-mice-and-cheese
3074-apple-redistribution-into-boxes
3075-maximize-happiness-of-selected-children
3387-minimum-operations-to-make-median-of-array-equal-to-k
3493-maximum-number-of-operations-to-move-ones-to-the-end
3788-maximum-unique-subarray-sum-after-deletion

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0108-convert-sorted-array-to-binary-search-tree
0169-majority-element
0324-wiggle-sort-ii
0347-top-k-frequent-elements
0912-sort-an-array

Matrix

0036-valid-sudoku
0037-sudoku-solver
0054-spiral-matrix
0059-spiral-matrix-ii
0074-search-a-2d-matrix
0130-surrounded-regions
0200-number-of-islands
0221-maximal-square
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0498-diagonal-traverse
0695-max-area-of-island
0777-toeplitz-matrix
0794-swim-in-rising-water
0921-spiral-matrix-iii
0994-rotting-oranges
1036-rotting-oranges
1351-count-negative-numbers-in-a-sorted-matrix
1463-the-k-weakest-rows-in-a-matrix
2625-increment-submatrices-by-one
2685-first-completely-painted-row-or-column
3459-find-the-minimum-area-to-cover-all-ones-ii
3461-find-the-minimum-area-to-cover-all-ones-i
3733-length-of-longest-v-shaped-diagonal-segment
3748-sort-matrix-by-diagonals
3797-design-spreadsheet

Simulation

0054-spiral-matrix
0059-spiral-matrix-ii
0498-diagonal-traverse
0682-baseball-game
0735-asteroid-collision
0921-spiral-matrix-iii
1441-build-an-array-with-stack-operations
1642-water-bottles
1929-concatenation-of-array
2211-count-collisions-on-a-road
2274-keep-multiplying-found-values-by-two
2402-meeting-rooms-iii
2408-number-of-people-aware-of-a-secret
3336-water-bottles-ii
3433-count-mentions-per-user
3600-find-the-k-th-character-in-string-game-i

Linked List

0002-add-two-numbers
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0061-rotate-list
0082-remove-duplicates-from-sorted-list-ii
0083-remove-duplicates-from-sorted-list
0086-partition-list
0141-linked-list-cycle
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list

Recursion

0002-add-two-numbers
0010-regular-expression-matching
0021-merge-two-sorted-lists
0024-swap-nodes-in-pairs
0044-wildcard-matching
0050-powx-n
0203-remove-linked-list-elements
0206-reverse-linked-list
0231-power-of-two
0234-palindrome-linked-list
0342-power-of-four
0486-predict-the-winner
1013-fibonacci-number
3483-unique-3-digit-even-numbers
3600-find-the-k-th-character-in-string-game-i

Sliding Window

0003-longest-substring-without-repeating-characters
0219-contains-duplicate-ii
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0632-smallest-range-covering-elements-from-k-lists
0867-new-21-game
1586-longest-subarray-of-1s-after-deleting-one-element
2599-take-k-of-each-character-from-left-and-right
3479-count-the-number-of-substrings-with-dominant-ones
3610-find-x-sum-of-all-k-long-subarrays-i
3652-best-time-to-buy-and-sell-stock-using-strategy

Stack

0020-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0084-largest-rectangle-in-histogram
0094-binary-tree-inorder-traversal
0150-evaluate-reverse-polish-notation
0155-min-stack
0234-palindrome-linked-list
0321-create-maximum-number
0678-valid-parenthesis-string
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0883-car-fleet
0973-stamping-the-sequence
1159-smallest-subsequence-of-distinct-characters
1441-build-an-array-with-stack-operations
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array
2211-count-collisions-on-a-road
2307-replace-non-coprime-numbers-in-array

Game Theory

0464-can-i-win
0486-predict-the-winner
3462-vowels-game-in-a-string

Memoization

0070-climbing-stairs
0139-word-break
0329-longest-increasing-path-in-a-matrix
0464-can-i-win
0638-shopping-offers
1013-fibonacci-number
3733-length-of-longest-v-shaped-diagonal-segment

Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0113-path-sum-ii
0789-kth-largest-element-in-a-stream
0863-sum-of-distances-in-tree
2564-most-profitable-path-in-a-tree
2872-maximum-number-of-k-divisible-components
3562-maximum-profit-from-trading-stocks-with-discounts

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0113-path-sum-ii
0130-surrounded-regions
0133-clone-graph
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0547-number-of-provinces
0684-redundant-connection
0695-max-area-of-island
0743-network-delay-time
0744-network-delay-time
0770-couples-holding-hands
0794-swim-in-rising-water
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0863-sum-of-distances-in-tree
0922-possible-bipartition
1300-critical-connections-in-a-network
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
2564-most-profitable-path-in-a-tree
2872-maximum-number-of-k-divisible-components
3562-maximum-profit-from-trading-stocks-with-discounts

Binary Tree

0094-binary-tree-inorder-traversal
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0108-convert-sorted-array-to-binary-search-tree
0110-balanced-binary-tree
0113-path-sum-ii
0789-kth-largest-element-in-a-stream

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0130-surrounded-regions
0133-clone-graph
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0322-coin-change
0329-longest-increasing-path-in-a-matrix
0417-pacific-atlantic-water-flow
0547-number-of-provinces
0684-redundant-connection
0695-max-area-of-island
0743-network-delay-time
0744-network-delay-time
0770-couples-holding-hands
0794-swim-in-rising-water
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0877-shortest-path-visiting-all-nodes
0922-possible-bipartition
0994-rotting-oranges
1036-rotting-oranges
1229-shortest-path-with-alternating-colors
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
2564-most-profitable-path-in-a-tree
2608-shortest-cycle-in-a-graph

Binary Search Tree

0096-unique-binary-search-trees
0098-validate-binary-search-tree
0108-convert-sorted-array-to-binary-search-tree
0789-kth-largest-element-in-a-stream

Heap (Priority Queue)

0239-sliding-window-maximum
0347-top-k-frequent-elements
0420-strong-password-checker
0502-ipo
0506-relative-ranks
0630-course-schedule-iii
0632-smallest-range-covering-elements-from-k-lists
0743-network-delay-time
0744-network-delay-time
0789-kth-largest-element-in-a-stream
0794-swim-in-rising-water
0887-minimum-cost-to-hire-k-workers
0902-minimum-number-of-refueling-stops
0912-sort-an-array
1127-last-stone-weight
1463-the-k-weakest-rows-in-a-matrix
1539-diagonal-traverse-ii
1574-maximum-product-of-two-elements-in-an-array
1612-avoid-flood-in-the-city
1917-maximum-average-pass-ratio
2054-two-best-non-overlapping-events
2402-meeting-rooms-iii
2429-design-a-food-rating-system
2681-put-marbles-in-bags
2725-mice-and-cheese
3610-find-x-sum-of-all-k-long-subarrays-i
3678-design-task-manager

Bucket Sort

0164-maximum-gap
0347-top-k-frequent-elements
0912-sort-an-array

Counting

0169-majority-element
0229-majority-element-ii
0347-top-k-frequent-elements
1726-tuple-with-same-product
3242-count-elements-with-maximum-frequency
3388-right-triangles
3493-maximum-number-of-operations-to-move-ones-to-the-end
3583-count-special-triplets
3866-first-unique-even-element
3872-find-most-frequent-vowel-and-consonant

Quickselect

0324-wiggle-sort-ii
0347-top-k-frequent-elements

Radix Sort

0164-maximum-gap
0912-sort-an-array

Graph

0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0329-longest-increasing-path-in-a-matrix
0547-number-of-provinces
0684-redundant-connection
0744-network-delay-time
0770-couples-holding-hands
0801-is-graph-bipartite
0813-all-paths-from-source-to-target
0863-sum-of-distances-in-tree
0877-shortest-path-visiting-all-nodes
0922-possible-bipartition
1039-find-the-town-judge
1229-shortest-path-with-alternating-colors
1300-critical-connections-in-a-network
1916-find-center-of-star-graph
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph
2564-most-profitable-path-in-a-tree
2608-shortest-cycle-in-a-graph

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0547-number-of-provinces
0684-redundant-connection
0695-max-area-of-island
0770-couples-holding-hands
0794-swim-in-rising-water
0801-is-graph-bipartite
0922-possible-bipartition
2092-find-all-people-with-secret
2121-find-if-path-exists-in-graph

Topological Sort

0207-course-schedule
0210-course-schedule-ii
0310-minimum-height-trees
0329-longest-increasing-path-in-a-matrix

Backtracking

0022-generate-parentheses
0037-sudoku-solver
0113-path-sum-ii
0494-target-sum
0526-beautiful-arrangement
0638-shopping-offers
0813-all-paths-from-source-to-target
1993-sum-of-all-subset-xor-totals
2114-minimum-number-of-work-sessions-to-finish-the-tasks

Bitmask

0464-can-i-win
0526-beautiful-arrangement
0638-shopping-offers
0823-split-array-with-same-average
0877-shortest-path-visiting-all-nodes
2114-minimum-number-of-work-sessions-to-finish-the-tasks

Shortest Path

0743-network-delay-time
0744-network-delay-time

Biconnected Component

1300-critical-connections-in-a-network

Trie

0014-longest-common-prefix
0139-word-break

Combinatorics

0062-unique-paths
1993-sum-of-all-subset-xor-totals
3199-distribute-candies-among-children-i
3201-distribute-candies-among-children-ii
3388-right-triangles
3577-count-the-number-of-computer-unlocking-permutations
3682-count-the-number-of-arrays-with-k-matching-adjacent-elements
3864-count-the-number-of-computer-unlocking-permutations

Prefix Sum

0238-product-of-array-except-self
0303-range-sum-query-immutable
0560-subarray-sum-equals-k
1480-running-sum-of-1d-array
1590-make-sum-divisible-by-p
2483-minimum-penalty-for-a-shop
2625-increment-submatrices-by-one
3381-maximum-subarray-sum-with-length-divisible-by-k
3432-count-partitions-with-even-sum-difference
3652-best-time-to-buy-and-sell-stock-using-strategy

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0321-create-maximum-number
0739-daily-temperatures
0779-max-chunks-to-make-sorted-ii
0883-car-fleet
1159-smallest-subsequence-of-distinct-characters
1633-minimum-number-of-increments-on-subarrays-to-form-a-target-array

Design

0155-min-stack
0303-range-sum-query-immutable
0789-kth-largest-element-in-a-stream
2429-design-a-food-rating-system
3678-design-task-manager
3797-design-spreadsheet

Probability and Statistics

0867-new-21-game

Enumeration

1925-count-square-sum-triples
1993-sum-of-all-subset-xor-totals
2605-form-smallest-number-from-two-digit-arrays
3010-divide-an-array-into-subarrays-with-minimum-cost-i
3199-distribute-candies-among-children-i
3201-distribute-candies-among-children-ii
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3459-find-the-minimum-area-to-cover-all-ones-ii
3479-count-the-number-of-substrings-with-dominant-ones
3483-unique-3-digit-even-numbers

Queue

0239-sliding-window-maximum
0973-stamping-the-sequence
2408-number-of-people-aware-of-a-secret

Geometry

0830-largest-triangle-area
3277-find-the-number-of-ways-to-place-people-ii
3278-find-the-number-of-ways-to-place-people-i
3623-count-number-of-trapezoids-i
3625-count-number-of-trapezoids-ii

Brainteaser

3462-vowels-game-in-a-string
3577-count-the-number-of-computer-unlocking-permutations
3864-count-the-number-of-computer-unlocking-permutations

Number Theory

2307-replace-non-coprime-numbers-in-array
2753-minimum-number-of-operations-to-make-all-array-elements-equal-to-1

Ordered Set

2429-design-a-food-rating-system
3678-design-task-manager
3791-fruits-into-baskets-iii

Data Stream

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

Segment Tree

3791-fruits-into-baskets-iii

Database

0175-combine-two-tables
0176-second-highest-salary
0178-rank-scores
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
0570-managers-with-at-least-5-direct-reports
0577-employee-bonus
0584-find-customer-referee
0586-customer-placing-the-largest-number-of-orders
0595-big-countries
0596-classes-with-at-least-5-students
0602-friend-requests-ii-who-has-the-most-friends
0607-sales-person
0608-tree-node
0610-triangle-judgement
0619-biggest-single-number
0620-not-boring-movies
0627-swap-sex-of-employees
1045-customers-who-bought-all-products
1050-actors-and-directors-who-cooperated-at-least-three-times
1068-product-sales-analysis-i
1075-project-employees-i
1158-market-analysis-i
1193-monthly-transactions-i
1393-capital-gainloss

Counting Sort

0561-array-partition
0912-sort-an-array
1365-how-many-numbers-are-smaller-than-the-current-number

Monotonic Queue

0239-sliding-window-maximum

Merge Sort

0912-sort-an-array

Union-Find

0200-number-of-islands
0684-redundant-connection

Graph Theory

0133-clone-graph
0207-course-schedule
0684-redundant-connection
0743-network-delay-time

About

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub)

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages