Skip to content

Latest commit

 

History

374 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

0001-two-sum
0014-longest-common-prefix
0027-remove-element
0035-search-insert-position
0053-maximum-subarray
0066-plus-one
0075-sort-colors
0121-best-time-to-buy-and-sell-stock
0152-maximum-product-subarray
0169-majority-element
0486-predict-the-winner
0628-maximum-product-of-three-numbers
0877-stone-game
1331-rank-transform-of-an-array
1406-stone-game-iii
1464-maximum-product-of-two-elements-in-an-array
1563-stone-game-v
1872-stone-game-viii
1979-find-greatest-common-divisor-of-array
2029-stone-game-ix
2149-rearrange-array-elements-by-sign
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
3312-sorted-gcd-pair-queries
3336-find-the-number-of-subsequences-with-equal-gcd
3471-find-the-largest-almost-missing-integer
3514-number-of-unique-xor-triplets-ii
3534-path-existence-queries-in-a-graph-ii
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
3867-sum-of-gcd-of-formed-pairs
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Dynamic Programming

0053-maximum-subarray
0115-distinct-subsequences
0121-best-time-to-buy-and-sell-stock
0152-maximum-product-subarray
0486-predict-the-winner
0877-stone-game
0940-distinct-subsequences-ii
1406-stone-game-iii
1510-stone-game-iv
1563-stone-game-v
1872-stone-game-viii
3302-find-the-lexicographically-smallest-valid-sequence
3336-find-the-number-of-subsequences-with-equal-gcd
3534-path-existence-queries-in-a-graph-ii

Hash Table

0001-two-sum
0169-majority-element
0205-isomorphic-strings
0242-valid-anagram
0451-sort-characters-by-frequency
1331-rank-transform-of-an-array
2958-length-of-longest-subarray-with-at-most-k-frequency
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3016-minimum-number-of-pushes-to-type-word-ii
3312-sorted-gcd-pair-queries
3471-find-the-largest-almost-missing-integer
3518-smallest-palindromic-rearrangement-ii
3568-minimum-moves-to-clean-the-classroom
3718-smallest-missing-multiple-of-k
3720-lexicographically-smallest-permutation-greater-than-target
3731-find-missing-elements

Two Pointers

0027-remove-element
0075-sort-colors
2149-rearrange-array-elements-by-sign
3302-find-the-lexicographically-smallest-valid-sequence
3534-path-existence-queries-in-a-graph-ii
3734-lexicographically-smallest-palindromic-permutation-greater-than-target
3867-sum-of-gcd-of-formed-pairs

Sorting

0075-sort-colors
0169-majority-element
0242-valid-anagram
0451-sort-characters-by-frequency
0628-maximum-product-of-three-numbers
1331-rank-transform-of-an-array
1464-maximum-product-of-two-elements-in-an-array
2948-make-lexicographically-smallest-array-by-swapping-elements
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3016-minimum-number-of-pushes-to-type-word-ii
3517-smallest-palindromic-rearrangement-i
3534-path-existence-queries-in-a-graph-ii
3536-maximum-product-of-two-digits
3731-find-missing-elements
3867-sum-of-gcd-of-formed-pairs

Divide and Conquer

0053-maximum-subarray
0169-majority-element
0190-reverse-bits

Counting

0169-majority-element
0451-sort-characters-by-frequency
2029-stone-game-ix
3016-minimum-number-of-pushes-to-type-word-ii
3312-sorted-gcd-pair-queries
3518-smallest-palindromic-rearrangement-ii
3720-lexicographically-smallest-permutation-greater-than-target

Simulation

2149-rearrange-array-elements-by-sign
3867-sum-of-gcd-of-formed-pairs

Math

0002-add-two-numbers
0066-plus-one
0486-predict-the-winner
0628-maximum-product-of-three-numbers
0877-stone-game
1406-stone-game-iii
1510-stone-game-iv
1563-stone-game-v
1872-stone-game-viii
1979-find-greatest-common-divisor-of-array
2029-stone-game-ix
3014-minimum-number-of-pushes-to-type-word-i
3312-sorted-gcd-pair-queries
3336-find-the-number-of-subsequences-with-equal-gcd
3345-smallest-divisible-digit-product-i
3348-smallest-divisible-digit-product-ii
3514-number-of-unique-xor-triplets-ii
3518-smallest-palindromic-rearrangement-ii
3536-maximum-product-of-two-digits
3622-check-divisibility-by-digit-sum-and-product
3658-gcd-of-odd-and-even-sums
3754-concatenate-non-zero-digits-and-multiply-by-sum-i
3867-sum-of-gcd-of-formed-pairs
3871-count-commas-in-range-ii
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii

Number Theory

1979-find-greatest-common-divisor-of-array
3312-sorted-gcd-pair-queries
3336-find-the-number-of-subsequences-with-equal-gcd
3348-smallest-divisible-digit-product-ii
3658-gcd-of-odd-and-even-sums
3867-sum-of-gcd-of-formed-pairs

Bit Manipulation

0190-reverse-bits
3514-number-of-unique-xor-triplets-ii
3534-path-existence-queries-in-a-graph-ii
3568-minimum-moves-to-clean-the-classroom
3702-longest-subsequence-with-non-zero-bitwise-xor

String

0014-longest-common-prefix
0115-distinct-subsequences
0205-isomorphic-strings
0242-valid-anagram
0451-sort-characters-by-frequency
0940-distinct-subsequences-ii
1081-smallest-subsequence-of-distinct-characters
1614-maximum-nesting-depth-of-the-parentheses
2213-longest-substring-of-one-repeating-character
2904-shortest-and-lexicographically-smallest-beautiful-string
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3499-maximize-active-section-with-trade-i
3517-smallest-palindromic-rearrangement-i
3518-smallest-palindromic-rearrangement-ii
3720-lexicographically-smallest-permutation-greater-than-target
3734-lexicographically-smallest-palindromic-permutation-greater-than-target

Heap (Priority Queue)

0451-sort-characters-by-frequency
1464-maximum-product-of-two-elements-in-an-array

Bucket Sort

0451-sort-characters-by-frequency

Stack

1081-smallest-subsequence-of-distinct-characters
1614-maximum-nesting-depth-of-the-parentheses

Binary Search

0035-search-insert-position
3312-sorted-gcd-pair-queries
3534-path-existence-queries-in-a-graph-ii

Combinatorics

3312-sorted-gcd-pair-queries
3518-smallest-palindromic-rearrangement-ii

Prefix Sum

1872-stone-game-viii
3312-sorted-gcd-pair-queries
3903-smallest-stable-index-i
3904-smallest-stable-index-ii

Enumeration

1291-sequential-digits
3345-smallest-divisible-digit-product-i
3499-maximize-active-section-with-trade-i
3514-number-of-unique-xor-triplets-ii
3720-lexicographically-smallest-permutation-greater-than-target
3734-lexicographically-smallest-palindromic-permutation-greater-than-target

Greedy

1081-smallest-subsequence-of-distinct-characters
2029-stone-game-ix
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii
3302-find-the-lexicographically-smallest-valid-sequence
3348-smallest-divisible-digit-product-ii
3534-path-existence-queries-in-a-graph-ii
3720-lexicographically-smallest-permutation-greater-than-target

Monotonic Stack

1081-smallest-subsequence-of-distinct-characters

Counting Sort

3517-smallest-palindromic-rearrangement-i

Linked List

0002-add-two-numbers
2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points

Recursion

0002-add-two-numbers
0486-predict-the-winner

Game Theory

0486-predict-the-winner
0877-stone-game
1406-stone-game-iii
1510-stone-game-iv
1563-stone-game-v
1872-stone-game-viii
2029-stone-game-ix

Minimax

1406-stone-game-iii
1510-stone-game-iv
1872-stone-game-viii
2029-stone-game-ix

Zero-Sum Game

1406-stone-game-iii
1510-stone-game-iv
1872-stone-game-viii
2029-stone-game-ix

Trie

0014-longest-common-prefix

Depth-First Search

2265-count-nodes-equal-to-average-of-subtree
2685-count-the-number-of-complete-components
3310-remove-methods-from-project

Breadth-First Search

2685-count-the-number-of-complete-components
3310-remove-methods-from-project
3568-minimum-moves-to-clean-the-classroom

Graph Theory

2685-count-the-number-of-complete-components
3310-remove-methods-from-project
3534-path-existence-queries-in-a-graph-ii

Backtracking

3348-smallest-divisible-digit-product-ii

Union-Find

2685-count-the-number-of-complete-components
2948-make-lexicographically-smallest-array-by-swapping-elements

Nim Game

1510-stone-game-iv
2029-stone-game-ix

Sprague–Grundy Theorem

1510-stone-game-iv

Sliding Window

2904-shortest-and-lexicographically-smallest-beautiful-string
2958-length-of-longest-subarray-with-at-most-k-frequency

Segment Tree

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

Ordered Set

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

Matrix

3568-minimum-moves-to-clean-the-classroom

Tree

2265-count-nodes-equal-to-average-of-subtree

Binary Tree

2265-count-nodes-equal-to-average-of-subtree

About

A repository containing my LeetCode solutions, organized by problem, to track my Data Structures & Algorithms learning journey.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages