Skip to content

ayushk-sinha/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

368 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

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
0026-remove-duplicates-from-sorted-array
0027-remove-element
0033-search-in-rotated-sorted-array
0075-sort-colors
0078-subsets
0088-merge-sorted-array
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0268-missing-number
0287-find-the-duplicate-number
0303-range-sum-query-immutable
0347-top-k-frequent-elements
0448-find-all-numbers-disappeared-in-an-array
0455-assign-cookies
0485-max-consecutive-ones
0525-contiguous-array
0560-subarray-sum-equals-k
0645-set-mismatch
0718-maximum-length-of-repeated-subarray
0792-binary-search
0952-word-subsets
1025-minimum-cost-for-tickets
1335-maximum-candies-allocated-to-k-children
1365-how-many-numbers-are-smaller-than-the-current-number
1470-shuffle-the-array
1476-count-negative-numbers-in-a-sorted-matrix
1524-string-matching-in-an-array
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1823-find-the-winner-of-the-circular-game
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
1929-concatenation-of-array
2292-counting-words-with-a-given-prefix
2358-number-of-ways-to-split-array
2362-minimum-rounds-to-complete-all-tasks
2465-shifting-letters-ii
2533-bitwise-xor-of-all-pairings
2614-maximum-count-of-positive-integer-and-negative-integer
2691-count-vowel-strings-in-ranges
2766-find-the-prefix-common-array-of-two-arrays
3094-minimum-number-of-operations-to-make-array-empty
3309-count-prefix-and-suffix-pairs-i
3606-coupon-code-validator

String

0020-valid-parentheses
0087-scramble-string
0392-is-subsequence
0952-word-subsets
1250-longest-common-subsequence
1312-minimum-insertion-steps-to-make-a-string-palindrome
1502-construct-k-palindrome-strings
1524-string-matching-in-an-array
1537-maximum-score-after-splitting-a-string
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
2221-check-if-a-parentheses-string-can-be-valid
2292-counting-words-with-a-given-prefix
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges
3309-count-prefix-and-suffix-pairs-i
3455-minimum-length-of-string-after-operations
3606-coupon-code-validator

Dynamic Programming

0087-scramble-string
0392-is-subsequence
0718-maximum-length-of-repeated-subarray
0887-super-egg-drop
1013-fibonacci-number
1025-minimum-cost-for-tickets
1250-longest-common-subsequence
1312-minimum-insertion-steps-to-make-a-string-palindrome
1744-number-of-ways-to-form-a-target-string-given-a-dictionary
1884-egg-drop-with-2-eggs-and-n-floors
2562-count-ways-to-build-good-strings

Binary Search

0033-search-in-rotated-sorted-array
0069-sqrtx
0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0268-missing-number
0287-find-the-duplicate-number
0718-maximum-length-of-repeated-subarray
0792-binary-search
0887-super-egg-drop
1335-maximum-candies-allocated-to-k-children
1476-count-negative-numbers-in-a-sorted-matrix
2614-maximum-count-of-positive-integer-and-negative-integer

Counting

0347-top-k-frequent-elements
1502-construct-k-palindrome-strings
2362-minimum-rounds-to-complete-all-tasks
2614-maximum-count-of-positive-integer-and-negative-integer
3094-minimum-number-of-operations-to-make-array-empty
3455-minimum-length-of-string-after-operations

Matrix

1476-count-negative-numbers-in-a-sorted-matrix

Hash Table

0001-two-sum
0217-contains-duplicate
0268-missing-number
0347-top-k-frequent-elements
0448-find-all-numbers-disappeared-in-an-array
0525-contiguous-array
0560-subarray-sum-equals-k
0645-set-mismatch
0952-word-subsets
1365-how-many-numbers-are-smaller-than-the-current-number
1502-construct-k-palindrome-strings
2059-unique-length-3-palindromic-subsequences
2362-minimum-rounds-to-complete-all-tasks
2766-find-the-prefix-common-array-of-two-arrays
3094-minimum-number-of-operations-to-make-array-empty
3455-minimum-length-of-string-after-operations
3606-coupon-code-validator

Greedy

0011-container-with-most-water
0455-assign-cookies
1502-construct-k-palindrome-strings
2221-check-if-a-parentheses-string-can-be-valid
2362-minimum-rounds-to-complete-all-tasks
2509-minimize-xor
3094-minimum-number-of-operations-to-make-array-empty

Two Pointers

0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0026-remove-duplicates-from-sorted-array
0027-remove-element
0075-sort-colors
0088-merge-sorted-array
0167-two-sum-ii-input-array-is-sorted
0234-palindrome-linked-list
0287-find-the-duplicate-number
0392-is-subsequence
0455-assign-cookies

Sorting

0015-3sum
0075-sort-colors
0088-merge-sorted-array
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0268-missing-number
0347-top-k-frequent-elements
0455-assign-cookies
0645-set-mismatch
1365-how-many-numbers-are-smaller-than-the-current-number
3606-coupon-code-validator

Divide and Conquer

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0372-super-pow

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements

Stack

0020-valid-parentheses
0234-palindrome-linked-list
2221-check-if-a-parentheses-string-can-be-valid
2871-double-a-number-represented-as-a-linked-list

Bit Manipulation

0078-subsets
0268-missing-number
0287-find-the-duplicate-number
0645-set-mismatch
0795-k-th-symbol-in-grammar
2059-unique-length-3-palindromic-subsequences
2509-minimize-xor
2533-bitwise-xor-of-all-pairings
2766-find-the-prefix-common-array-of-two-arrays

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
0303-range-sum-query-immutable
0525-contiguous-array
0560-subarray-sum-equals-k
1537-maximum-score-after-splitting-a-string
1895-minimum-number-of-operations-to-move-all-balls-to-each-box
2059-unique-length-3-palindromic-subsequences
2358-number-of-ways-to-split-array
2465-shifting-letters-ii
2691-count-vowel-strings-in-ranges

Design

0303-range-sum-query-immutable

String Matching

1524-string-matching-in-an-array
2292-counting-words-with-a-given-prefix
3309-count-prefix-and-suffix-pairs-i

Trie

3309-count-prefix-and-suffix-pairs-i

Rolling Hash

0718-maximum-length-of-repeated-subarray
3309-count-prefix-and-suffix-pairs-i

Hash Function

0718-maximum-length-of-repeated-subarray
3309-count-prefix-and-suffix-pairs-i

Math

0002-add-two-numbers
0050-powx-n
0069-sqrtx
0268-missing-number
0372-super-pow
0795-k-th-symbol-in-grammar
0887-super-egg-drop
1013-fibonacci-number
1823-find-the-winner-of-the-circular-game
1884-egg-drop-with-2-eggs-and-n-floors
2871-double-a-number-represented-as-a-linked-list

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0050-powx-n
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
0795-k-th-symbol-in-grammar
1013-fibonacci-number
1823-find-the-winner-of-the-circular-game

Bucket Sort

0347-top-k-frequent-elements

Brainteaser

2533-bitwise-xor-of-all-pairings

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0203-remove-linked-list-elements
0206-reverse-linked-list
0234-palindrome-linked-list
2871-double-a-number-represented-as-a-linked-list

Tree

0104-maximum-depth-of-binary-tree

Depth-First Search

0104-maximum-depth-of-binary-tree

Breadth-First Search

0104-maximum-depth-of-binary-tree

Binary Tree

0104-maximum-depth-of-binary-tree

Backtracking

0078-subsets

Memoization

1013-fibonacci-number

Queue

1823-find-the-winner-of-the-circular-game

Simulation

1823-find-the-winner-of-the-circular-game
1929-concatenation-of-array

Sliding Window

0209-minimum-size-subarray-sum
0718-maximum-length-of-repeated-subarray

Counting Sort

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

About

A collection of LeetCode questions to ace the coding interview!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages