Skip to content

Aditya123-bit/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

896 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
0015-3sum
0016-3sum-closest
0018-4sum
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0053-maximum-subarray
0055-jump-game
0066-plus-one
0073-set-matrix-zeroes
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0081-search-in-rotated-sorted-array-ii
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock
0136-single-number
0137-single-number-ii
0153-find-minimum-in-rotated-sorted-array
0154-find-minimum-in-rotated-sorted-array-ii
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0204-count-primes
0217-contains-duplicate
0229-majority-element-ii
0283-move-zeroes
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
0540-single-element-in-a-sorted-array
0560-subarray-sum-equals-k
0713-subarray-product-less-than-k
0792-binary-search
0882-peak-index-in-a-mountain-array
0898-transpose-matrix
0907-koko-eating-bananas
1019-squares-of-a-sorted-array
1056-capacity-to-ship-packages-within-d-days
1293-three-consecutive-odds
1319-unique-number-of-occurrences
1390-four-divisors
1408-find-the-smallest-divisor-given-a-threshold
1421-find-numbers-with-even-number-of-digits
1482-how-many-numbers-are-smaller-than-the-current-number
1505-create-target-array-in-the-given-order
1528-kids-with-the-greatest-number-of-candies
1528-shuffle-string
1548-check-if-all-1s-are-at-least-length-k-places-away
1580-shuffle-the-array
1605-minimum-number-of-days-to-make-m-bouquets
1635-number-of-good-pairs
1646-kth-missing-positive-number
1662-check-if-two-string-arrays-are-equivalent
1675-magnetic-force-between-two-balls
1752-check-if-array-is-sorted-and-rotated
1773-count-items-matching-a-rule
1791-richest-customer-wealth
1833-find-the-highest-altitude
1950-sign-of-the-product-of-an-array
1967-number-of-strings-that-appear-as-substrings-in-word
2042-maximum-product-difference-between-two-pairs
2048-build-array-from-permutation
2058-concatenation-of-array
2231-find-first-palindromic-string-in-the-array
2271-rearrange-array-elements-by-sign
2274-keep-multiplying-found-values-by-two
2442-count-number-of-distinct-integers-after-reverse-operations
2624-difference-between-element-sum-and-digit-sum-of-an-array
2836-neither-minimum-nor-maximum
2876-number-of-employees-who-met-the-target
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3226-minimum-number-game
3432-count-partitions-with-even-sum-difference
3512-minimum-operations-to-make-array-sum-divisible-by-k
3515-find-if-digit-game-can-be-won
3581-the-two-sneaky-numbers-of-digitville

Hash Table

0001-two-sum
0073-set-matrix-zeroes
0169-majority-element
0202-happy-number
0217-contains-duplicate
0229-majority-element-ii
0242-valid-anagram
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0448-find-all-numbers-disappeared-in-an-array
0560-subarray-sum-equals-k
0567-permutation-in-string
1319-unique-number-of-occurrences
1482-how-many-numbers-are-smaller-than-the-current-number
1635-number-of-good-pairs
2274-keep-multiplying-found-values-by-two
2442-count-number-of-distinct-integers-after-reverse-operations
3581-the-two-sneaky-numbers-of-digitville

Simulation

0258-add-digits
0657-robot-return-to-origin
0898-transpose-matrix
1505-create-target-array-in-the-given-order
1910-remove-all-occurrences-of-a-substring
2048-build-array-from-permutation
2058-concatenation-of-array
2271-rearrange-array-elements-by-sign
2274-keep-multiplying-found-values-by-two
2288-count-operations-to-obtain-zero
3226-minimum-number-game
3768-check-if-digits-are-equal-in-string-after-operations-i

Math

0009-palindrome-number
0050-powx-n
0066-plus-one
0069-sqrtx
0189-rotate-array
0202-happy-number
0204-count-primes
0231-power-of-two
0258-add-digits
0263-ugly-number
0326-power-of-three
0367-valid-perfect-square
0507-perfect-number
0633-sum-of-square-numbers
0728-self-dividing-numbers
1390-four-divisors
1421-find-numbers-with-even-number-of-digits
1448-maximum-69-number
1523-count-odd-numbers-in-an-interval-range
1635-number-of-good-pairs
1817-calculate-money-in-leetcode-bank
1925-count-square-sum-triples
1950-sign-of-the-product-of-an-array
1952-three-divisors
2288-count-operations-to-obtain-zero
2383-add-two-integers
2413-smallest-even-multiple
2427-number-of-common-factors
2442-count-number-of-distinct-integers-after-reverse-operations
2523-closest-prime-numbers-in-range
2608-count-the-digits-that-divide-a-number
2624-difference-between-element-sum-and-digit-sum-of-an-array
2752-sum-multiples
3172-divisible-and-non-divisible-sums-difference
3190-find-minimum-operations-to-make-all-elements-divisible-by-three
3432-count-partitions-with-even-sum-difference
3512-minimum-operations-to-make-array-sum-divisible-by-k
3515-find-if-digit-game-can-be-won
3581-the-two-sneaky-numbers-of-digitville
3658-gcd-of-odd-and-even-sums
3768-check-if-digits-are-equal-in-string-after-operations-i

Matrix

0073-set-matrix-zeroes
0898-transpose-matrix
1791-richest-customer-wealth

Two Pointers

0011-container-with-most-water
0015-3sum
0016-3sum-closest
0018-4sum
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0075-sort-colors
0080-remove-duplicates-from-sorted-array-ii
0125-valid-palindrome
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
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
0350-intersection-of-two-arrays-ii
0443-string-compression
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0567-permutation-in-string
0633-sum-of-square-numbers
1019-squares-of-a-sorted-array
2231-find-first-palindromic-string-in-the-array
2271-rearrange-array-elements-by-sign

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0069-sqrtx
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0154-find-minimum-in-rotated-sorted-array-ii
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
0367-valid-perfect-square
0540-single-element-in-a-sorted-array
0633-sum-of-square-numbers
0713-subarray-product-less-than-k
0792-binary-search
0882-peak-index-in-a-mountain-array
0907-koko-eating-bananas
1056-capacity-to-ship-packages-within-d-days
1408-find-the-smallest-divisor-given-a-threshold
1605-minimum-number-of-days-to-make-m-bouquets
1646-kth-missing-positive-number
1675-magnetic-force-between-two-balls

Counting

0169-majority-element
0229-majority-element-ii
1635-number-of-good-pairs
1704-determine-if-string-halves-are-alike
2442-count-number-of-distinct-integers-after-reverse-operations
2833-furthest-point-from-origin
3493-maximum-number-of-operations-to-move-ones-to-the-end

Sorting

0015-3sum
0016-3sum-closest
0018-4sum
0075-sort-colors
0169-majority-element
0217-contains-duplicate
0229-majority-element-ii
0242-valid-anagram
0349-intersection-of-two-arrays
0350-intersection-of-two-arrays-ii
1019-squares-of-a-sorted-array
1482-how-many-numbers-are-smaller-than-the-current-number
1675-magnetic-force-between-two-balls
2042-maximum-product-difference-between-two-pairs
2274-keep-multiplying-found-values-by-two
2836-neither-minimum-nor-maximum
3226-minimum-number-game

Counting Sort

1482-how-many-numbers-are-smaller-than-the-current-number

Prefix Sum

0560-subarray-sum-equals-k
0713-subarray-product-less-than-k
1833-find-the-highest-altitude
3432-count-partitions-with-even-sum-difference

Sliding Window

0567-permutation-in-string
0713-subarray-product-less-than-k

String

0125-valid-palindrome
0151-reverse-words-in-a-string
0242-valid-anagram
0344-reverse-string
0345-reverse-vowels-of-a-string
0443-string-compression
0541-reverse-string-ii
0557-reverse-words-in-a-string-iii
0567-permutation-in-string
0657-robot-return-to-origin
0709-to-lower-case
0742-to-lower-case
1108-defanging-an-ip-address
1528-shuffle-string
1662-check-if-two-string-arrays-are-equivalent
1678-goal-parser-interpretation
1704-determine-if-string-halves-are-alike
1773-count-items-matching-a-rule
1910-remove-all-occurrences-of-a-substring
1967-number-of-strings-that-appear-as-substrings-in-word
2231-find-first-palindromic-string-in-the-array
2346-largest-3-same-digit-number-in-string
2833-furthest-point-from-origin
3493-maximum-number-of-operations-to-move-ones-to-the-end
3768-check-if-digits-are-equal-in-string-after-operations-i

Divide and Conquer

0053-maximum-subarray
0169-majority-element

Dynamic Programming

0053-maximum-subarray
0055-jump-game
0118-pascals-triangle
0121-best-time-to-buy-and-sell-stock

Bit Manipulation

0136-single-number
0137-single-number-ii
0231-power-of-two
0287-find-the-duplicate-number

Number Theory

0204-count-primes
0258-add-digits
1952-three-divisors
2413-smallest-even-multiple
2427-number-of-common-factors
2523-closest-prime-numbers-in-range
3658-gcd-of-odd-and-even-sums
3768-check-if-digits-are-equal-in-string-after-operations-i

Heap (Priority Queue)

3226-minimum-number-game

Greedy

0011-container-with-most-water
0055-jump-game
1448-maximum-69-number
3493-maximum-number-of-operations-to-move-ones-to-the-end

Recursion

0050-powx-n
0231-power-of-two
0326-power-of-three

Combinatorics

3768-check-if-digits-are-equal-in-string-after-operations-i

Enumeration

0204-count-primes
1925-count-square-sum-triples
1952-three-divisors
2427-number-of-common-factors

Stack

1910-remove-all-occurrences-of-a-substring

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors