Skip to content

This repository serves as a collection of my solutions to various LeetCode Data Structures and Algorithms (DSA) problems, organized by the level of difficulty.

Notifications You must be signed in to change notification settings

rajank404/LeetCode-Solution

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
0015-3sum
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
0053-maximum-subarray
0075-sort-colors
0081-search-in-rotated-sorted-array-ii
0088-merge-sorted-array
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0136-single-number
0137-single-number-ii
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0169-majority-element
0189-rotate-array
0204-count-primes
0229-majority-element-ii
0260-single-number-iii
0268-missing-number
0283-move-zeroes
0485-max-consecutive-ones
0540-single-element-in-a-sorted-array
0560-subarray-sum-equals-k
0674-longest-continuous-increasing-subsequence
0792-binary-search
0952-word-subsets
1044-find-common-characters
1231-replace-elements-with-greatest-element-on-right-side
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1603-running-sum-of-1d-array
2106-find-greatest-common-divisor-of-array
2210-find-target-indices-after-sorting-array
2271-rearrange-array-elements-by-sign
2691-count-vowel-strings-in-ranges
3194-find-words-containing-character
3428-find-the-xor-of-numbers-which-appear-twice

Bit Manipulation

0136-single-number
0137-single-number-ii
0260-single-number-iii
0268-missing-number
0389-find-the-difference
3428-find-the-xor-of-numbers-which-appear-twice

String

0013-roman-to-integer
0125-valid-palindrome
0389-find-the-difference
0952-word-subsets
1044-find-common-characters
1146-greatest-common-divisor-of-strings
1542-consecutive-characters
1904-second-largest-digit-in-a-string
1970-sorting-the-sentence
2168-check-if-numbers-are-ascending-in-a-sentence
2243-check-if-all-as-appears-before-all-bs
2691-count-vowel-strings-in-ranges
3194-find-words-containing-character
3426-minimum-number-of-chairs-in-a-waiting-room

Prefix Sum

0560-subarray-sum-equals-k
1603-running-sum-of-1d-array
2691-count-vowel-strings-in-ranges

Hash Table

0001-two-sum
0013-roman-to-integer
0128-longest-consecutive-sequence
0169-majority-element
0202-happy-number
0229-majority-element-ii
0268-missing-number
0389-find-the-difference
0560-subarray-sum-equals-k
0952-word-subsets
1044-find-common-characters
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1904-second-largest-digit-in-a-string
3428-find-the-xor-of-numbers-which-appear-twice

Two Pointers

0015-3sum
0018-4sum
0026-remove-duplicates-from-sorted-array
0031-next-permutation
0075-sort-colors
0088-merge-sorted-array
0125-valid-palindrome
0189-rotate-array
0202-happy-number
0283-move-zeroes
1468-check-if-n-and-its-double-exist
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
0081-search-in-rotated-sorted-array-ii
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0268-missing-number
0540-single-element-in-a-sorted-array
0792-binary-search
1468-check-if-n-and-its-double-exist
2210-find-target-indices-after-sorting-array

Sorting

0015-3sum
0018-4sum
0075-sort-colors
0088-merge-sorted-array
0169-majority-element
0229-majority-element-ii
0268-missing-number
0389-find-the-difference
1256-rank-transform-of-an-array
1468-check-if-n-and-its-double-exist
1970-sorting-the-sentence
2210-find-target-indices-after-sorting-array

Math

0007-reverse-integer
0009-palindrome-number
0013-roman-to-integer
0189-rotate-array
0202-happy-number
0204-count-primes
0258-add-digits
0268-missing-number
0507-perfect-number
0728-self-dividing-numbers
1013-fibonacci-number
1146-greatest-common-divisor-of-strings
1889-check-if-number-is-a-sum-of-powers-of-three
2083-three-divisors
2106-find-greatest-common-divisor-of-array
2491-smallest-even-multiple
2556-convert-the-temperature
2608-count-the-digits-that-divide-a-number

Divide and Conquer

0053-maximum-subarray
0169-majority-element

Counting

0169-majority-element
0229-majority-element-ii

Dynamic Programming

0053-maximum-subarray
0121-best-time-to-buy-and-sell-stock
0152-maximum-product-subarray
1013-fibonacci-number

Recursion

1013-fibonacci-number

Memoization

1013-fibonacci-number

Simulation

0258-add-digits
2271-rearrange-array-elements-by-sign
3426-minimum-number-of-chairs-in-a-waiting-room

Union Find

0128-longest-consecutive-sequence

Number Theory

0204-count-primes
0258-add-digits
2083-three-divisors
2106-find-greatest-common-divisor-of-array
2491-smallest-even-multiple

Enumeration

0204-count-primes
2083-three-divisors

About

This repository serves as a collection of my solutions to various LeetCode Data Structures and Algorithms (DSA) problems, organized by the level of difficulty.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages