Skip to content

Latest commit

 

History

548 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

LeetCode Topics

Array

0016-3sum-closest
0018-4sum
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
0048-rotate-image
0049-group-anagrams
0056-merge-intervals
0128-longest-consecutive-sequence
0136-single-number
0153-find-minimum-in-rotated-sorted-array
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0209-minimum-size-subarray-sum
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0268-missing-number
0303-range-sum-query-immutable
0322-coin-change
0347-top-k-frequent-elements
0421-maximum-xor-of-two-numbers-in-an-array
0442-find-all-duplicates-in-an-array
0486-predict-the-winner
0525-contiguous-array
0560-subarray-sum-equals-k
0692-top-k-frequent-words
0704-binary-search
0724-find-pivot-index
0739-daily-temperatures
0835-image-overlap
0875-koko-eating-bananas
0877-stone-game
0930-binary-subarrays-with-sum
0973-k-closest-points-to-origin
0974-subarray-sums-divisible-by-k
1046-last-stone-weight
1140-stone-game-ii
1260-shift-2d-grid
1386-cinema-seat-allocation
1406-stone-game-iii
1563-stone-game-v
1872-stone-game-viii
2029-stone-game-ix
2091-removing-minimum-and-maximum-from-array
2144-minimum-cost-of-buying-candies-with-discount
2213-longest-substring-of-one-repeating-character
2948-make-lexicographically-smallest-array-by-swapping-elements
2958-length-of-longest-subarray-with-at-most-k-frequency
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3116-kth-smallest-amount-with-single-denomination-combination
3414-maximum-score-of-non-overlapping-intervals
3471-find-the-largest-almost-missing-integer
3483-unique-3-digit-even-numbers
3568-minimum-moves-to-clean-the-classroom
3702-longest-subsequence-with-non-zero-bitwise-xor
3718-smallest-missing-multiple-of-k
3731-find-missing-elements
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Math

0048-rotate-image
0189-rotate-array
0268-missing-number
0486-predict-the-winner
0836-rectangle-overlap
0877-stone-game
0973-k-closest-points-to-origin
1140-stone-game-ii
1406-stone-game-iii
1563-stone-game-v
1621-number-of-sets-of-k-non-overlapping-line-segments
1872-stone-game-viii
1927-sum-game
2029-stone-game-ix
3116-kth-smallest-amount-with-single-denomination-combination
3345-smallest-divisible-digit-product-i
3348-smallest-divisible-digit-product-ii
3622-check-divisibility-by-digit-sum-and-product
3870-count-commas-in-range
3871-count-commas-in-range-ii
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii

Two Pointers

0016-3sum-closest
0018-4sum
0019-remove-nth-node-from-end-of-list
0141-linked-list-cycle
0160-intersection-of-two-linked-lists
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0234-palindrome-linked-list
0443-string-compression
0567-permutation-in-string
0876-middle-of-the-linked-list
2472-maximum-number-of-non-overlapping-palindrome-substrings
3302-find-the-lexicographically-smallest-valid-sequence
3734-lexicographically-smallest-palindromic-permutation-greater-than-target

Binary Search

0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0035-search-insert-position
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
0704-binary-search
0875-koko-eating-bananas
3116-kth-smallest-amount-with-single-denomination-combination
3414-maximum-score-of-non-overlapping-intervals

Hash Table

0003-longest-substring-without-repeating-characters
0049-group-anagrams
0128-longest-consecutive-sequence
0141-linked-list-cycle
0160-intersection-of-two-linked-lists
0217-contains-duplicate
0268-missing-number
0347-top-k-frequent-elements
0421-maximum-xor-of-two-numbers-in-an-array
0424-longest-repeating-character-replacement
0442-find-all-duplicates-in-an-array
0525-contiguous-array
0560-subarray-sum-equals-k
0567-permutation-in-string
0692-top-k-frequent-words
0930-binary-subarrays-with-sum
0974-subarray-sums-divisible-by-k
1386-cinema-seat-allocation
2958-length-of-longest-subarray-with-at-most-k-frequency
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3090-maximum-length-substring-with-two-occurrences
3471-find-the-largest-almost-missing-integer
3483-unique-3-digit-even-numbers
3568-minimum-moves-to-clean-the-classroom
3718-smallest-missing-multiple-of-k
3720-lexicographically-smallest-permutation-greater-than-target
3731-find-missing-elements

String

0003-longest-substring-without-repeating-characters
0049-group-anagrams
0115-distinct-subsequences
0424-longest-repeating-character-replacement
0443-string-compression
0567-permutation-in-string
0692-top-k-frequent-words
0940-distinct-subsequences-ii
1927-sum-game
2213-longest-substring-of-one-repeating-character
2472-maximum-number-of-non-overlapping-palindrome-substrings
2904-shortest-and-lexicographically-smallest-beautiful-string
3090-maximum-length-substring-with-two-occurrences
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3720-lexicographically-smallest-permutation-greater-than-target
3734-lexicographically-smallest-palindromic-permutation-greater-than-target

Sliding Window

0003-longest-substring-without-repeating-characters
0209-minimum-size-subarray-sum
0424-longest-repeating-character-replacement
0567-permutation-in-string
0930-binary-subarrays-with-sum
2904-shortest-and-lexicographically-smallest-beautiful-string
2958-length-of-longest-subarray-with-at-most-k-frequency
3090-maximum-length-substring-with-two-occurrences

Matrix

0048-rotate-image
0835-image-overlap
1260-shift-2d-grid
3568-minimum-moves-to-clean-the-classroom

Union-Find

0128-longest-consecutive-sequence
2948-make-lexicographically-smallest-array-by-swapping-elements

Divide and Conquer

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0973-k-closest-points-to-origin

Sorting

0016-3sum-closest
0018-4sum
0049-group-anagrams
0056-merge-intervals
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0268-missing-number
0347-top-k-frequent-elements
0442-find-all-duplicates-in-an-array
0692-top-k-frequent-words
0973-k-closest-points-to-origin
2144-minimum-cost-of-buying-candies-with-discount
2948-make-lexicographically-smallest-array-by-swapping-elements
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3414-maximum-score-of-non-overlapping-intervals
3731-find-missing-elements

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0692-top-k-frequent-words
0703-kth-largest-element-in-a-stream
0973-k-closest-points-to-origin
1046-last-stone-weight

Bucket Sort

0347-top-k-frequent-elements
0692-top-k-frequent-words

Counting

0347-top-k-frequent-elements
0692-top-k-frequent-words
2029-stone-game-ix
3720-lexicographically-smallest-permutation-greater-than-target

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0973-k-closest-points-to-origin

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
0724-find-pivot-index
0930-binary-subarrays-with-sum
0974-subarray-sums-divisible-by-k
1140-stone-game-ii
1621-number-of-sets-of-k-non-overlapping-line-segments
1872-stone-game-viii
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
0703-kth-largest-element-in-a-stream
2265-count-nodes-equal-to-average-of-subtree

Depth-First Search

0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
2265-count-nodes-equal-to-average-of-subtree
3310-remove-methods-from-project

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0322-coin-change
0515-find-largest-value-in-each-tree-row
0637-average-of-levels-in-binary-tree
3310-remove-methods-from-project
3568-minimum-moves-to-clean-the-classroom

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0199-binary-tree-right-side-view
0226-invert-binary-tree
0515-find-largest-value-in-each-tree-row
0543-diameter-of-binary-tree
0637-average-of-levels-in-binary-tree
0703-kth-largest-element-in-a-stream
2265-count-nodes-equal-to-average-of-subtree

Linked List

0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0116-populating-next-right-pointers-in-each-node
0141-linked-list-cycle
0160-intersection-of-two-linked-lists
0234-palindrome-linked-list
0876-middle-of-the-linked-list
2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points

Recursion

0021-merge-two-sorted-lists
0234-palindrome-linked-list
0486-predict-the-winner
3483-unique-3-digit-even-numbers

Binary Search Tree

0098-validate-binary-search-tree
0703-kth-largest-element-in-a-stream

Bit Manipulation

0136-single-number
0268-missing-number
0421-maximum-xor-of-two-numbers-in-an-array
1386-cinema-seat-allocation
3116-kth-smallest-amount-with-single-denomination-combination
3568-minimum-moves-to-clean-the-classroom
3702-longest-subsequence-with-non-zero-bitwise-xor

Trie

0421-maximum-xor-of-two-numbers-in-an-array
0692-top-k-frequent-words

Stack

0234-palindrome-linked-list
0739-daily-temperatures

Monotonic Stack

0739-daily-temperatures

Dynamic Programming

0115-distinct-subsequences
0322-coin-change
0486-predict-the-winner
0877-stone-game
0940-distinct-subsequences-ii
1140-stone-game-ii
1406-stone-game-iii
1563-stone-game-v
1621-number-of-sets-of-k-non-overlapping-line-segments
1872-stone-game-viii
2472-maximum-number-of-non-overlapping-palindrome-substrings
3302-find-the-lexicographically-smallest-valid-sequence
3414-maximum-score-of-non-overlapping-intervals

Backtracking

0113-path-sum-ii
3348-smallest-divisible-digit-product-ii

Simulation

1260-shift-2d-grid

Design

0303-range-sum-query-immutable
0703-kth-largest-element-in-a-stream

Data Stream

0703-kth-largest-element-in-a-stream

Geometry

0836-rectangle-overlap
0973-k-closest-points-to-origin

Game Theory

0486-predict-the-winner
0877-stone-game
1140-stone-game-ii
1406-stone-game-iii
1563-stone-game-v
1872-stone-game-viii
1927-sum-game
2029-stone-game-ix

Graph Theory

3310-remove-methods-from-project

Enumeration

3345-smallest-divisible-digit-product-i
3483-unique-3-digit-even-numbers
3720-lexicographically-smallest-permutation-greater-than-target
3734-lexicographically-smallest-palindromic-permutation-greater-than-target

Greedy

1386-cinema-seat-allocation
1927-sum-game
2029-stone-game-ix
2091-removing-minimum-and-maximum-from-array
2144-minimum-cost-of-buying-candies-with-discount
2472-maximum-number-of-non-overlapping-palindrome-substrings
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3720-lexicographically-smallest-permutation-greater-than-target

Number Theory

3116-kth-smallest-amount-with-single-denomination-combination
3348-smallest-divisible-digit-product-ii

Minimax

1140-stone-game-ii
1872-stone-game-viii
2029-stone-game-ix

Zero-Sum Game

1140-stone-game-ii
1872-stone-game-viii
2029-stone-game-ix

Segment Tree

2213-longest-substring-of-one-repeating-character

Ordered Set

2213-longest-substring-of-one-repeating-character

Nim Game

2029-stone-game-ix

Combinatorics

1621-number-of-sets-of-k-non-overlapping-line-segments
3116-kth-smallest-amount-with-single-denomination-combination

About

Problem solving on LeetCode

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages