Skip to content

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

736 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leetcode-problems

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

LeetCode Topics

Array

0004-median-of-two-sorted-arrays
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0041-first-missing-positive
0042-trapping-rain-water
0049-group-anagrams
0053-maximum-subarray
0055-jump-game
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0081-search-in-rotated-sorted-array-ii
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0088-merge-sorted-array
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0136-single-number
0150-evaluate-reverse-polish-notation
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0229-majority-element-ii
0238-product-of-array-except-self
0260-single-number-iii
0268-missing-number
0283-move-zeroes
0347-top-k-frequent-elements
0410-split-array-largest-sum
0414-third-maximum-number
0416-partition-equal-subset-sum
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0496-next-greater-element-i
0682-baseball-game
0704-binary-search
0735-asteroid-collision
0739-daily-temperatures
0744-find-smallest-letter-greater-than-target
0853-car-fleet
0875-koko-eating-bananas
0877-stone-game
0881-boats-to-save-people
0907-sum-of-subarray-minimums
0948-bag-of-tokens
0962-maximum-width-ramp
0977-squares-of-a-sorted-array
0989-add-to-array-form-of-integer
1011-capacity-to-ship-packages-within-d-days
1200-minimum-absolute-difference
1288-remove-covered-intervals
1394-find-lucky-integer-in-an-array
1846-maximum-element-after-decreasing-and-rearranging
1967-number-of-strings-that-appear-as-substrings-in-word
2016-maximum-difference-between-increasing-elements
2089-find-target-indices-after-sorting-array
2239-find-closest-number-to-zero
2404-most-frequent-even-element
2733-neither-minimum-nor-maximum
2913-subarrays-distinct-element-sum-of-squares-i
2942-find-words-containing-character
2951-find-the-peaks
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3020-find-the-maximum-number-of-elements-in-subset
3069-distribute-elements-into-two-arrays-i
3238-find-the-number-of-winning-players
3285-find-indices-of-stable-mountains
3502-minimum-cost-to-reach-every-position
3550-smallest-index-with-digit-sum-equal-to-index
3551-minimum-swaps-to-sort-by-digit-sum
3718-smallest-missing-multiple-of-k
3731-find-missing-elements
3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii
3867-sum-of-gcd-of-formed-pairs
3876-construct-uniform-parity-array-ii
3903-smallest-stable-index-i

Hash Table

0012-integer-to-roman
0013-roman-to-integer
0036-valid-sudoku
0041-first-missing-positive
0049-group-anagrams
0073-set-matrix-zeroes
0128-longest-consecutive-sequence
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0219-contains-duplicate-ii
0229-majority-element-ii
0268-missing-number
0347-top-k-frequent-elements
0424-longest-repeating-character-replacement
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0496-next-greater-element-i
1358-number-of-substrings-containing-all-three-characters
1394-find-lucky-integer-in-an-array
2404-most-frequent-even-element
2913-subarrays-distinct-element-sum-of-squares-i
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3016-minimum-number-of-pushes-to-type-word-ii
3020-find-the-maximum-number-of-elements-in-subset
3238-find-the-number-of-winning-players
3551-minimum-swaps-to-sort-by-digit-sum
3718-smallest-missing-multiple-of-k
3731-find-missing-elements
3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii

Matrix

0036-valid-sudoku
0064-minimum-path-sum
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0085-maximal-rectangle

Two Pointers

0011-container-with-most-water
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0042-trapping-rain-water
0075-sort-colors
0088-merge-sorted-array
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0234-palindrome-linked-list
0283-move-zeroes
0876-middle-of-the-linked-list
0881-boats-to-save-people
0948-bag-of-tokens
0962-maximum-width-ramp
0977-squares-of-a-sorted-array
1768-merge-strings-alternately
2095-delete-the-middle-node-of-a-linked-list
3867-sum-of-gcd-of-formed-pairs

Greedy

0011-container-with-most-water
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0410-split-array-largest-sum
0881-boats-to-save-people
0948-bag-of-tokens
1846-maximum-element-after-decreasing-and-rearranging
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii

Union-Find

0128-longest-consecutive-sequence

Sorting

0049-group-anagrams
0075-sort-colors
0088-merge-sorted-array
0229-majority-element-ii
0268-missing-number
0347-top-k-frequent-elements
0414-third-maximum-number
0442-find-all-duplicates-in-an-array
0853-car-fleet
0881-boats-to-save-people
0948-bag-of-tokens
0977-squares-of-a-sorted-array
1200-minimum-absolute-difference
1288-remove-covered-intervals
1846-maximum-element-after-decreasing-and-rearranging
2089-find-target-indices-after-sorting-array
2733-neither-minimum-nor-maximum
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3016-minimum-number-of-pushes-to-type-word-ii
3551-minimum-swaps-to-sort-by-digit-sum
3731-find-missing-elements
3867-sum-of-gcd-of-formed-pairs

Counting

0229-majority-element-ii
0347-top-k-frequent-elements
1394-find-lucky-integer-in-an-array
2404-most-frequent-even-element
3016-minimum-number-of-pushes-to-type-word-ii
3238-find-the-number-of-winning-players
3737-count-subarrays-with-majority-element-i

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0069-sqrtx
0074-search-a-2d-matrix
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0268-missing-number
0374-guess-number-higher-or-lower
0410-split-array-largest-sum
0704-binary-search
0744-find-smallest-letter-greater-than-target
0875-koko-eating-bananas
1011-capacity-to-ship-packages-within-d-days
2089-find-target-indices-after-sorting-array

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0410-split-array-largest-sum
3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii
3903-smallest-stable-index-i

Math

0002-add-two-numbers
0012-integer-to-roman
0013-roman-to-integer
0069-sqrtx
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0224-basic-calculator
0231-power-of-two
0258-add-digits
0268-missing-number
0319-bulb-switcher
0342-power-of-four
0371-sum-of-two-integers
0415-add-strings
0877-stone-game
0989-add-to-array-form-of-integer
1523-count-odd-numbers-in-an-interval-range
3014-minimum-number-of-pushes-to-type-word-i
3222-find-the-winning-player-in-coin-game
3345-smallest-divisible-digit-product-i
3492-maximum-containers-on-a-ship
3550-smallest-index-with-digit-sum-equal-to-index
3622-check-divisibility-by-digit-sum-and-product
3754-concatenate-non-zero-digits-and-multiply-by-sum-i
3867-sum-of-gcd-of-formed-pairs
3870-count-commas-in-range
3876-construct-uniform-parity-array-ii

Simulation

0258-add-digits
0415-add-strings
0682-baseball-game
0735-asteroid-collision
3069-distribute-elements-into-two-arrays-i
3222-find-the-winning-player-in-coin-game
3498-reverse-degree-of-a-string
3867-sum-of-gcd-of-formed-pairs

Number Theory

0258-add-digits
3867-sum-of-gcd-of-formed-pairs

Dynamic Programming

0042-trapping-rain-water
0053-maximum-subarray
0055-jump-game
0064-minimum-path-sum
0070-climbing-stairs
0085-maximal-rectangle
0121-best-time-to-buy-and-sell-stock
0122-best-time-to-buy-and-sell-stock-ii
0338-counting-bits
0410-split-array-largest-sum
0416-partition-equal-subset-sum
0877-stone-game
0907-sum-of-subarray-minimums

String

0012-integer-to-roman
0013-roman-to-integer
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0049-group-anagrams
0224-basic-calculator
0415-add-strings
0424-longest-repeating-character-replacement
0686-repeated-string-match
1047-remove-all-adjacent-duplicates-in-string
1358-number-of-substrings-containing-all-three-characters
1768-merge-strings-alternately
1967-number-of-strings-that-appear-as-substrings-in-word
2490-circular-sentence
2942-find-words-containing-character
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii
3498-reverse-degree-of-a-string

Brainteaser

0319-bulb-switcher

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0190-reverse-bits
0191-number-of-1-bits
0347-top-k-frequent-elements
3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii

Segment Tree

2913-subarrays-distinct-element-sum-of-squares-i
3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii

Merge Sort

3737-count-subarrays-with-majority-element-i
3739-count-subarrays-with-majority-element-ii

Sliding Window

0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
0424-longest-repeating-character-replacement
1358-number-of-substrings-containing-all-three-characters

Enumeration

2951-find-the-peaks
3020-find-the-maximum-number-of-elements-in-subset
3345-smallest-divisible-digit-product-i

Stack

0020-valid-parentheses
0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0150-evaluate-reverse-polish-notation
0155-min-stack
0224-basic-calculator
0234-palindrome-linked-list
0496-next-greater-element-i
0682-baseball-game
0735-asteroid-collision
0739-daily-temperatures
0853-car-fleet
0901-online-stock-span
0907-sum-of-subarray-minimums
0962-maximum-width-ramp
1047-remove-all-adjacent-duplicates-in-string

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0085-maximal-rectangle
0496-next-greater-element-i
0739-daily-temperatures
0853-car-fleet
0901-online-stock-span
0907-sum-of-subarray-minimums
0962-maximum-width-ramp

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string
0686-repeated-string-match

Bit Manipulation

0078-subsets
0136-single-number
0190-reverse-bits
0191-number-of-1-bits
0231-power-of-two
0260-single-number-iii
0268-missing-number
0338-counting-bits
0342-power-of-four
0371-sum-of-two-integers
0461-hamming-distance
0476-number-complement
0693-binary-number-with-alternating-bits
2220-minimum-bit-flips-to-convert-number

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0206-reverse-linked-list
0224-basic-calculator
0231-power-of-two
0234-palindrome-linked-list
0342-power-of-four

Memoization

0070-climbing-stairs

Backtracking

0078-subsets

Game Theory

0877-stone-game
3222-find-the-winning-player-in-coin-game

Knapsack Problem

0416-partition-equal-subset-sum

0-1 Knapsack

0416-partition-equal-subset-sum

Range Minimum/Maximum Query

0084-largest-rectangle-in-histogram

Design

0155-min-stack
0901-online-stock-span

Bracket Sequences

0020-valid-parentheses

Data Stream

0901-online-stock-span

Heap (Priority Queue)

0347-top-k-frequent-elements

Bucket Sort

0347-top-k-frequent-elements

Quickselect

0347-top-k-frequent-elements

Interactive

0374-guess-number-higher-or-lower

Newton's Method

0069-sqrtx

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0141-linked-list-cycle
0142-linked-list-cycle-ii
0160-intersection-of-two-linked-lists
0206-reverse-linked-list
0234-palindrome-linked-list
0328-odd-even-linked-list
0876-middle-of-the-linked-list
2095-delete-the-middle-node-of-a-linked-list

Quicksort

0075-sort-colors

Bubble Sort

0075-sort-colors

Floyd's Cycle Finding Algorithm

0141-linked-list-cycle
0142-linked-list-cycle-ii

Binary Indexed Tree

2913-subarrays-distinct-element-sum-of-squares-i

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages