Skip to content

Latest commit

 

History

1,255 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Progress

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

LeetCode Topics

Array

0001-two-sum
0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0035-search-insert-position
0046-permutations
0048-rotate-image
0066-plus-one
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0081-search-in-rotated-sorted-array-ii
0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0136-single-number
0137-single-number-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0198-house-robber
0204-count-primes
0217-contains-duplicate
0219-contains-duplicate-ii
0238-product-of-array-except-self
0239-sliding-window-maximum
0240-search-a-2d-matrix-ii
0260-single-number-iii
0268-missing-number
0283-move-zeroes
0287-find-the-duplicate-number
0289-game-of-life
0303-range-sum-query-immutable
0313-super-ugly-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0485-max-consecutive-ones
0500-keyboard-row
0605-can-place-flowers
0645-set-mismatch
0682-baseball-game
0704-binary-search
0724-find-pivot-index
0739-daily-temperatures
0832-flipping-an-image
0912-sort-an-array
0942-di-string-match
0977-squares-of-a-sorted-array
0989-add-to-array-form-of-integer
1051-height-checker
1122-relative-sort-array
1160-find-words-that-can-be-formed-by-characters
1331-rank-transform-of-an-array
1351-count-negative-numbers-in-a-sorted-matrix
1356-sort-integers-by-the-number-of-1-bits
1365-how-many-numbers-are-smaller-than-the-current-number
1385-find-the-distance-value-between-two-arrays
1423-maximum-points-you-can-obtain-from-cards
1431-kids-with-the-greatest-number-of-candies
1470-shuffle-the-array
1502-can-make-arithmetic-progression-from-sequence
1512-number-of-good-pairs
1528-shuffle-string
1662-check-if-two-string-arrays-are-equivalent
1665-minimum-initial-energy-to-finish-tasks
1672-richest-customer-wealth
1732-find-the-highest-altitude
1748-sum-of-unique-elements
1929-concatenation-of-array
1979-find-greatest-common-divisor-of-array
1991-find-the-middle-index-in-array
2011-final-value-of-variable-after-performing-operations
2089-find-target-indices-after-sorting-array
2091-removing-minimum-and-maximum-from-array
2161-partition-array-according-to-given-pivot
2206-divide-array-into-equal-pairs
2221-find-triangular-sum-of-an-array
2239-find-closest-number-to-zero
2418-sort-the-people
2442-count-number-of-distinct-integers-after-reverse-operations
2529-maximum-count-of-positive-integer-and-negative-integer
2798-number-of-employees-who-met-the-target
2824-count-pairs-whose-sum-is-less-than-target
2942-find-words-containing-character
3065-minimum-operations-to-exceed-threshold-value-i
3069-distribute-elements-into-two-arrays-i
3158-find-the-xor-of-numbers-which-appear-twice
3467-transform-array-by-parity
3668-restore-finishing-order
3731-find-missing-elements
3838-weighted-word-mapping
3875-construct-uniform-parity-array-i
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Hash Table

0001-two-sum
0012-integer-to-roman
0013-roman-to-integer
0073-set-matrix-zeroes
0128-longest-consecutive-sequence
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0264-ugly-number-ii
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0398-random-pick-index
0442-find-all-duplicates-in-an-array
0448-find-all-numbers-disappeared-in-an-array
0451-sort-characters-by-frequency
0500-keyboard-row
0535-encode-and-decode-tinyurl
0645-set-mismatch
0771-jewels-and-stones
1015-smallest-integer-divisible-by-k
1122-relative-sort-array
1160-find-words-that-can-be-formed-by-characters
1331-rank-transform-of-an-array
1365-how-many-numbers-are-smaller-than-the-current-number
1512-number-of-good-pairs
1748-sum-of-unique-elements
2206-divide-array-into-equal-pairs
2325-decode-the-message
2418-sort-the-people
2442-count-number-of-distinct-integers-after-reverse-operations
3158-find-the-xor-of-numbers-which-appear-twice
3668-restore-finishing-order
3731-find-missing-elements
3760-maximum-substrings-with-distinct-start
3941-password-strength
3945-digit-frequency-score

Sorting

0075-sort-colors
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0349-intersection-of-two-arrays
0389-find-the-difference
0442-find-all-duplicates-in-an-array
0451-sort-characters-by-frequency
0645-set-mismatch
0912-sort-an-array
0977-squares-of-a-sorted-array
1051-height-checker
1122-relative-sort-array
1331-rank-transform-of-an-array
1356-sort-integers-by-the-number-of-1-bits
1365-how-many-numbers-are-smaller-than-the-current-number
1385-find-the-distance-value-between-two-arrays
1502-can-make-arithmetic-progression-from-sequence
1665-minimum-initial-energy-to-finish-tasks
1859-sorting-the-sentence
2089-find-target-indices-after-sorting-array
2418-sort-the-people
2824-count-pairs-whose-sum-is-less-than-target
3467-transform-array-by-parity
3731-find-missing-elements

String

0008-string-to-integer-atoi
0012-integer-to-roman
0013-roman-to-integer
0020-valid-parentheses
0028-find-the-index-of-the-first-occurrence-in-a-string
0043-multiply-strings
0058-length-of-last-word
0067-add-binary
0125-valid-palindrome
0151-reverse-words-in-a-string
0205-isomorphic-strings
0242-valid-anagram
0344-reverse-string
0345-reverse-vowels-of-a-string
0383-ransom-note
0387-first-unique-character-in-a-string
0389-find-the-difference
0412-fizz-buzz
0415-add-strings
0451-sort-characters-by-frequency
0500-keyboard-row
0504-base-7
0535-encode-and-decode-tinyurl
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0657-robot-return-to-origin
0709-to-lower-case
0771-jewels-and-stones
0942-di-string-match
1108-defanging-an-ip-address
1160-find-words-that-can-be-formed-by-characters
1528-shuffle-string
1662-check-if-two-string-arrays-are-equivalent
1768-merge-strings-alternately
1859-sorting-the-sentence
2000-reverse-prefix-of-word
2011-final-value-of-variable-after-performing-operations
2325-decode-the-message
2379-minimum-recolors-to-get-k-consecutive-black-blocks
2390-removing-stars-from-a-string
2418-sort-the-people
2810-faulty-keyboard
2833-furthest-point-from-origin
2942-find-words-containing-character
3110-score-of-a-string
3280-convert-date-to-binary
3498-reverse-degree-of-a-string
3750-minimum-number-of-flips-to-reverse-binary-string
3756-concatenate-non-zero-digits-and-multiply-by-sum-ii
3760-maximum-substrings-with-distinct-start
3794-reverse-string-prefix
3838-weighted-word-mapping
3941-password-strength

Divide and Conquer

0169-majority-element
0190-reverse-bits
0191-number-of-1-bits
0240-search-a-2d-matrix-ii
0347-top-k-frequent-elements
0912-sort-an-array

Heap (Priority Queue)

0239-sliding-window-maximum
0264-ugly-number-ii
0347-top-k-frequent-elements
0451-sort-characters-by-frequency
0912-sort-an-array

Bucket Sort

0347-top-k-frequent-elements
0451-sort-characters-by-frequency
0912-sort-an-array

Counting

0169-majority-element
0347-top-k-frequent-elements
0383-ransom-note
0387-first-unique-character-in-a-string
0451-sort-characters-by-frequency
1160-find-words-that-can-be-formed-by-characters
1356-sort-integers-by-the-number-of-1-bits
1512-number-of-good-pairs
1748-sum-of-unique-elements
2206-divide-array-into-equal-pairs
2442-count-number-of-distinct-integers-after-reverse-operations
2529-maximum-count-of-positive-integer-and-negative-integer
2833-furthest-point-from-origin
3467-transform-array-by-parity

Quickselect

0347-top-k-frequent-elements

Union-Find

0128-longest-consecutive-sequence

Two Pointers

0011-container-with-most-water
0026-remove-duplicates-from-sorted-array
0027-remove-element
0028-find-the-index-of-the-first-occurrence-in-a-string
0075-sort-colors
0125-valid-palindrome
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0283-move-zeroes
0287-find-the-duplicate-number
0344-reverse-string
0345-reverse-vowels-of-a-string
0349-intersection-of-two-arrays
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0832-flipping-an-image
0942-di-string-match
0977-squares-of-a-sorted-array
1385-find-the-distance-value-between-two-arrays
1768-merge-strings-alternately
2000-reverse-prefix-of-word
2161-partition-array-according-to-given-pivot
2396-strictly-palindromic-number
2824-count-pairs-whose-sum-is-less-than-target
3750-minimum-number-of-flips-to-reverse-binary-string
3794-reverse-string-prefix

Prefix Sum

0238-product-of-array-except-self
0303-range-sum-query-immutable
0724-find-pivot-index
1423-maximum-points-you-can-obtain-from-cards
1732-find-the-highest-altitude
1991-find-the-middle-index-in-array
2485-find-the-pivot-integer
3756-concatenate-non-zero-digits-and-multiply-by-sum-ii
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Binary Search

0033-search-in-rotated-sorted-array
0035-search-insert-position
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
0240-search-a-2d-matrix-ii
0268-missing-number
0278-first-bad-version
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0367-valid-perfect-square
0374-guess-number-higher-or-lower
0441-arranging-coins
0704-binary-search
1351-count-negative-numbers-in-a-sorted-matrix
1385-find-the-distance-value-between-two-arrays
2089-find-target-indices-after-sorting-array
2529-maximum-count-of-positive-integer-and-negative-integer
2824-count-pairs-whose-sum-is-less-than-target

Dynamic Programming

0118-pascals-triangle
0119-pascals-triangle-ii
0121-best-time-to-buy-and-sell-stock
0198-house-robber
0264-ugly-number-ii
0313-super-ugly-number
0509-fibonacci-number
0788-rotated-digits
1025-divisor-game

Stack

0020-valid-parentheses
0682-baseball-game
0739-daily-temperatures
2000-reverse-prefix-of-word
2390-removing-stars-from-a-string

Monotonic Stack

0739-daily-temperatures

Linked List

0206-reverse-linked-list

Recursion

0050-powx-n
0206-reverse-linked-list
0231-power-of-two
0326-power-of-three
0342-power-of-four
0509-fibonacci-number

Math

0007-reverse-integer
0009-palindrome-number
0012-integer-to-roman
0013-roman-to-integer
0043-multiply-strings
0048-rotate-image
0050-powx-n
0066-plus-one
0067-add-binary
0069-sqrtx
0202-happy-number
0204-count-primes
0231-power-of-two
0258-add-digits
0263-ugly-number
0264-ugly-number-ii
0268-missing-number
0313-super-ugly-number
0319-bulb-switcher
0326-power-of-three
0342-power-of-four
0367-valid-perfect-square
0371-sum-of-two-integers
0398-random-pick-index
0412-fizz-buzz
0415-add-strings
0441-arranging-coins
0504-base-7
0509-fibonacci-number
0728-self-dividing-numbers
0788-rotated-digits
0836-rectangle-overlap
0989-add-to-array-form-of-integer
1015-smallest-integer-divisible-by-k
1025-divisor-game
1323-maximum-69-number
1492-the-kth-factor-of-n
1512-number-of-good-pairs
1837-sum-of-digits-in-base-k
1979-find-greatest-common-divisor-of-array
2119-a-number-after-a-double-reversal
2221-find-triangular-sum-of-an-array
2396-strictly-palindromic-number
2413-smallest-even-multiple
2427-number-of-common-factors
2442-count-number-of-distinct-integers-after-reverse-operations
2469-convert-the-temperature
2485-find-the-pivot-integer
2525-categorize-box-according-to-criteria
2769-find-the-maximum-achievable-number
3280-convert-date-to-binary
3658-gcd-of-odd-and-even-sums
3750-minimum-number-of-flips-to-reverse-binary-string
3754-concatenate-non-zero-digits-and-multiply-by-sum-i
3756-concatenate-non-zero-digits-and-multiply-by-sum-ii
3870-count-commas-in-range
3871-count-commas-in-range-ii
3875-construct-uniform-parity-array-i
3945-digit-frequency-score

Simulation

0043-multiply-strings
0067-add-binary
0258-add-digits
0289-game-of-life
0412-fizz-buzz
0415-add-strings
0657-robot-return-to-origin
0682-baseball-game
0832-flipping-an-image
1929-concatenation-of-array
2011-final-value-of-variable-after-performing-operations
2161-partition-array-according-to-given-pivot
2221-find-triangular-sum-of-an-array
2390-removing-stars-from-a-string
2810-faulty-keyboard
3069-distribute-elements-into-two-arrays-i
3498-reverse-degree-of-a-string
3838-weighted-word-mapping

Combinatorics

2221-find-triangular-sum-of-an-array

Number Theory

0204-count-primes
0258-add-digits
1492-the-kth-factor-of-n
1979-find-greatest-common-divisor-of-array
2221-find-triangular-sum-of-an-array
2413-smallest-even-multiple
2427-number-of-common-factors
3658-gcd-of-odd-and-even-sums

Backtracking

0046-permutations

Memoization

0509-fibonacci-number

Counting Sort

0912-sort-an-array
1051-height-checker
1122-relative-sort-array
1365-how-many-numbers-are-smaller-than-the-current-number

Greedy

0011-container-with-most-water
0605-can-place-flowers
0942-di-string-match
1323-maximum-69-number
1665-minimum-initial-energy-to-finish-tasks
2091-removing-minimum-and-maximum-from-array

Bit Manipulation

0067-add-binary
0136-single-number
0137-single-number-ii
0190-reverse-bits
0191-number-of-1-bits
0231-power-of-two
0260-single-number-iii
0268-missing-number
0287-find-the-duplicate-number
0342-power-of-four
0371-sum-of-two-integers
0389-find-the-difference
0476-number-complement
0645-set-mismatch
0832-flipping-an-image
0868-binary-gap
1009-complement-of-base-10-integer
1356-sort-integers-by-the-number-of-1-bits
2206-divide-array-into-equal-pairs
3158-find-the-xor-of-numbers-which-appear-twice
3750-minimum-number-of-flips-to-reverse-binary-string

Matrix

0048-rotate-image
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0240-search-a-2d-matrix-ii
0289-game-of-life
0832-flipping-an-image
1351-count-negative-numbers-in-a-sorted-matrix
1672-richest-customer-wealth

Enumeration

0204-count-primes
1291-sequential-digits
2427-number-of-common-factors

Brainteaser

0319-bulb-switcher
1025-divisor-game
2396-strictly-palindromic-number

Game Theory

1025-divisor-game

Impartial Game

1025-divisor-game

Boyer–Moore Majority Vote Algorithm

0169-majority-element

Quicksort

0075-sort-colors
1122-relative-sort-array

Bubble Sort

0075-sort-colors
1122-relative-sort-array
1859-sorting-the-sentence

String Matching

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

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

Queue

0239-sliding-window-maximum
0387-first-unique-character-in-a-string

Sliding Window

0219-contains-duplicate-ii
0239-sliding-window-maximum
1423-maximum-points-you-can-obtain-from-cards
2379-minimum-recolors-to-get-k-consecutive-black-blocks

Monotonic Queue

0239-sliding-window-maximum

Range Minimum/Maximum Query

0239-sliding-window-maximum

Pigeonhole Principle

0287-find-the-duplicate-number
1015-smallest-integer-divisible-by-k

Floyd's Cycle Finding Algorithm

0287-find-the-duplicate-number

Newton's Method

0069-sqrtx

Design

0303-range-sum-query-immutable
0535-encode-and-decode-tinyurl

Merge Sort

0912-sort-an-array

Radix Sort

0912-sort-an-array

Geometry

0836-rectangle-overlap

Reservoir Sampling

0398-random-pick-index

Randomized

0398-random-pick-index

Bracket Sequences

0020-valid-parentheses

Hash Function

0535-encode-and-decode-tinyurl

Interactive

0278-first-bad-version
0374-guess-number-higher-or-lower

About

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

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages