Skip to content

Latest commit

 

History

697 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode-Solutions

LeetCode Topics

Tree

0094-binary-tree-inorder-traversal
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0199-binary-tree-right-side-view
1766-tree-of-coprimes
3558-number-of-ways-to-assign-edge-weights-i

Depth-First Search

0094-binary-tree-inorder-traversal
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0199-binary-tree-right-side-view
0200-number-of-islands
0565-array-nesting
1766-tree-of-coprimes
2492-minimum-score-of-a-path-between-two-cities
2685-count-the-number-of-complete-components
3558-number-of-ways-to-assign-edge-weights-i

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0199-binary-tree-right-side-view
0200-number-of-islands
0322-coin-change
2492-minimum-score-of-a-path-between-two-cities
2685-count-the-number-of-complete-components
2812-find-the-safest-path-in-a-grid
3286-find-a-safe-walk-through-a-grid
3568-minimum-moves-to-clean-the-classroom

Binary Tree

0094-binary-tree-inorder-traversal
0099-recover-binary-search-tree
0100-same-tree
0101-symmetric-tree
0199-binary-tree-right-side-view

Array

0001-two-sum
0011-container-with-most-water
0031-next-permutation
0037-sudoku-solver
0041-first-missing-positive
0057-insert-interval
0075-sort-colors
0120-triangle
0121-best-time-to-buy-and-sell-stock
0137-single-number-ii
0169-majority-element
0200-number-of-islands
0229-majority-element-ii
0315-count-of-smaller-numbers-after-self
0322-coin-change
0486-predict-the-winner
0494-target-sum
0565-array-nesting
0786-k-th-smallest-prime-fraction
0821-shortest-distance-to-a-character
0833-find-and-replace-in-string
1140-stone-game-ii
1260-shift-2d-grid
1266-minimum-time-visiting-all-points
1288-remove-covered-intervals
1301-number-of-paths-with-max-score
1406-stone-game-iii
1464-maximum-product-of-two-elements-in-an-array
1732-find-the-highest-altitude
1766-tree-of-coprimes
1833-maximum-ice-cream-bars
1979-find-greatest-common-divisor-of-array
2029-stone-game-ix
2091-removing-minimum-and-maximum-from-array
2161-partition-array-according-to-given-pivot
2461-maximum-sum-of-distinct-subarrays-with-length-k
2812-find-the-safest-path-in-a-grid
2948-make-lexicographically-smallest-array-by-swapping-elements
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3069-distribute-elements-into-two-arrays-i
3162-find-the-number-of-good-pairs-i
3286-find-a-safe-walk-through-a-grid
3312-sorted-gcd-pair-queries
3336-find-the-number-of-subsequences-with-equal-gcd
3471-find-the-largest-almost-missing-integer
3501-maximize-active-section-with-trade-ii
3512-minimum-operations-to-make-array-sum-divisible-by-k
3514-number-of-unique-xor-triplets-ii
3532-path-existence-queries-in-a-graph-i
3534-path-existence-queries-in-a-graph-ii
3568-minimum-moves-to-clean-the-classroom
3620-network-recovery-pathways
3693-climbing-stairs-ii
3702-longest-subsequence-with-non-zero-bitwise-xor
3731-find-missing-elements
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii
3903-smallest-stable-index-i

Union-Find

0200-number-of-islands
2492-minimum-score-of-a-path-between-two-cities
2685-count-the-number-of-complete-components
2812-find-the-safest-path-in-a-grid
2948-make-lexicographically-smallest-array-by-swapping-elements
3532-path-existence-queries-in-a-graph-i

Matrix

0037-sudoku-solver
0200-number-of-islands
1260-shift-2d-grid
1301-number-of-paths-with-max-score
2812-find-the-safest-path-in-a-grid
3286-find-a-safe-walk-through-a-grid
3568-minimum-moves-to-clean-the-classroom

Hash Table

0001-two-sum
0012-integer-to-roman
0037-sudoku-solver
0041-first-missing-positive
0141-linked-list-cycle
0169-majority-element
0202-happy-number
0229-majority-element-ii
0389-find-the-difference
0567-permutation-in-string
0833-find-and-replace-in-string
2351-first-letter-to-appear-twice
2461-maximum-sum-of-distinct-subarrays-with-length-k
2996-smallest-missing-integer-greater-than-sequential-prefix-sum
3016-minimum-number-of-pushes-to-type-word-ii
3090-maximum-length-substring-with-two-occurrences
3162-find-the-number-of-good-pairs-i
3312-sorted-gcd-pair-queries
3471-find-the-largest-almost-missing-integer
3518-smallest-palindromic-rearrangement-ii
3532-path-existence-queries-in-a-graph-i
3568-minimum-moves-to-clean-the-classroom
3720-lexicographically-smallest-permutation-greater-than-target
3731-find-missing-elements

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0141-linked-list-cycle
2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0019-remove-nth-node-from-end-of-list
0028-find-the-index-of-the-first-occurrence-in-a-string
0031-next-permutation
0075-sort-colors
0125-valid-palindrome
0141-linked-list-cycle
0165-compare-version-numbers
0202-happy-number
0567-permutation-in-string
0786-k-th-smallest-prime-fraction
0821-shortest-distance-to-a-character
1768-merge-strings-alternately
2161-partition-array-according-to-given-pivot
3534-path-existence-queries-in-a-graph-ii

Simulation

1260-shift-2d-grid
2161-partition-array-according-to-given-pivot
3069-distribute-elements-into-two-arrays-i

Backtracking

0037-sudoku-solver
0077-combinations
0494-target-sum

Math

0002-add-two-numbers
0007-reverse-integer
0012-integer-to-roman
0069-sqrtx
0070-climbing-stairs
0171-excel-sheet-column-number
0172-factorial-trailing-zeroes
0202-happy-number
0231-power-of-two
0263-ugly-number
0292-nim-game
0319-bulb-switcher
0326-power-of-three
0486-predict-the-winner
1071-greatest-common-divisor-of-strings
1140-stone-game-ii
1266-minimum-time-visiting-all-points
1406-stone-game-iii
1766-tree-of-coprimes
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
3512-minimum-operations-to-make-array-sum-divisible-by-k
3514-number-of-unique-xor-triplets-ii
3518-smallest-palindromic-rearrangement-ii
3558-number-of-ways-to-assign-edge-weights-i
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
3875-construct-uniform-parity-array-i
3876-construct-uniform-parity-array-ii

Number Theory

1766-tree-of-coprimes
1979-find-greatest-common-divisor-of-array
3312-sorted-gcd-pair-queries
3336-find-the-number-of-subsequences-with-equal-gcd
3658-gcd-of-odd-and-even-sums

String

0005-longest-palindromic-substring
0008-string-to-integer-atoi
0012-integer-to-roman
0028-find-the-index-of-the-first-occurrence-in-a-string
0125-valid-palindrome
0165-compare-version-numbers
0171-excel-sheet-column-number
0389-find-the-difference
0394-decode-string
0567-permutation-in-string
0821-shortest-distance-to-a-character
0833-find-and-replace-in-string
0856-score-of-parentheses
0921-minimum-add-to-make-parentheses-valid
1071-greatest-common-divisor-of-strings
1143-longest-common-subsequence
1768-merge-strings-alternately
2351-first-letter-to-appear-twice
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii
3090-maximum-length-substring-with-two-occurrences
3499-maximize-active-section-with-trade-i
3501-maximize-active-section-with-trade-ii
3517-smallest-palindromic-rearrangement-i
3518-smallest-palindromic-rearrangement-ii
3720-lexicographically-smallest-permutation-greater-than-target

Dynamic Programming

0005-longest-palindromic-substring
0070-climbing-stairs
0120-triangle
0121-best-time-to-buy-and-sell-stock
0322-coin-change
0486-predict-the-winner
0494-target-sum
1140-stone-game-ii
1143-longest-common-subsequence
1301-number-of-paths-with-max-score
1406-stone-game-iii
3336-find-the-number-of-subsequences-with-equal-gcd
3534-path-existence-queries-in-a-graph-ii
3620-network-recovery-pathways
3693-climbing-stairs-ii

Binary Search

0069-sqrtx
0315-count-of-smaller-numbers-after-self
0786-k-th-smallest-prime-fraction
2812-find-the-safest-path-in-a-grid
3312-sorted-gcd-pair-queries
3501-maximize-active-section-with-trade-ii
3532-path-existence-queries-in-a-graph-i
3534-path-existence-queries-in-a-graph-ii
3620-network-recovery-pathways

Database

0175-combine-two-tables
0176-second-highest-salary
0181-employees-earning-more-than-their-managers
0182-duplicate-emails
0197-rising-temperature
0584-find-customer-referee
0595-big-countries
0620-not-boring-movies
1068-product-sales-analysis-i
1075-project-employees-i
1164-product-price-at-a-given-date
1193-monthly-transactions-i
1211-queries-quality-and-percentage
1251-average-selling-price
1280-students-and-examinations
1378-replace-employee-id-with-the-unique-identifier
1484-group-sold-products-by-the-date
1581-customer-who-visited-but-did-not-make-any-transactions
1633-percentage-of-users-attended-a-contest
1661-average-time-of-process-per-machine
1757-recyclable-and-low-fat-products
1934-confirmation-rate

Geometry

1266-minimum-time-visiting-all-points

Stack

0094-binary-tree-inorder-traversal
0394-decode-string
0856-score-of-parentheses
0921-minimum-add-to-make-parentheses-valid

Prefix Sum

1140-stone-game-ii
1732-find-the-highest-altitude
3312-sorted-gcd-pair-queries
3903-smallest-stable-index-i

Greedy

0011-container-with-most-water
0921-minimum-add-to-make-parentheses-valid
1833-maximum-ice-cream-bars
2029-stone-game-ix
2091-removing-minimum-and-maximum-from-array
3014-minimum-number-of-pushes-to-type-word-i
3016-minimum-number-of-pushes-to-type-word-ii
3534-path-existence-queries-in-a-graph-ii
3720-lexicographically-smallest-permutation-greater-than-target

Sorting

0075-sort-colors
0169-majority-element
0229-majority-element-ii
0389-find-the-difference
0786-k-th-smallest-prime-fraction
0833-find-and-replace-in-string
1288-remove-covered-intervals
1464-maximum-product-of-two-elements-in-an-array
1833-maximum-ice-cream-bars
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
3731-find-missing-elements

Counting Sort

0169-majority-element
0229-majority-element-ii
1833-maximum-ice-cream-bars
2029-stone-game-ix
2351-first-letter-to-appear-twice
3016-minimum-number-of-pushes-to-type-word-ii
3312-sorted-gcd-pair-queries
3517-smallest-palindromic-rearrangement-i
3518-smallest-palindromic-rearrangement-ii
3720-lexicographically-smallest-permutation-greater-than-target

Memoization

0070-climbing-stairs

Brainteaser

0292-nim-game
0319-bulb-switcher

Game Theory

0292-nim-game
0486-predict-the-winner
1140-stone-game-ii
1406-stone-game-iii
2029-stone-game-ix

String Matching

0028-find-the-index-of-the-first-occurrence-in-a-string

Heap (Priority Queue)

0786-k-th-smallest-prime-fraction
1464-maximum-product-of-two-elements-in-an-array
2812-find-the-safest-path-in-a-grid
3286-find-a-safe-walk-through-a-grid
3620-network-recovery-pathways

Graph Theory

2492-minimum-score-of-a-path-between-two-cities
2685-count-the-number-of-complete-components
3286-find-a-safe-walk-through-a-grid
3532-path-existence-queries-in-a-graph-i
3534-path-existence-queries-in-a-graph-ii
3620-network-recovery-pathways

Shortest Path

3286-find-a-safe-walk-through-a-grid
3620-network-recovery-pathways

Topological Sort

3620-network-recovery-pathways

Recursion

0002-add-two-numbers
0231-power-of-two
0326-power-of-three
0394-decode-string
0486-predict-the-winner

Bit Manipulation

0137-single-number-ii
0231-power-of-two
0389-find-the-difference
2351-first-letter-to-appear-twice
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

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

Combinatorics

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

Segment Tree

0315-count-of-smaller-numbers-after-self
3501-maximize-active-section-with-trade-ii

Sliding Window

0567-permutation-in-string
2461-maximum-sum-of-distinct-subarrays-with-length-k
3090-maximum-length-substring-with-two-occurrences

Bracket Sequences

0856-score-of-parentheses
0921-minimum-add-to-make-parentheses-valid

Divide and Conquer

0169-majority-element
0315-count-of-smaller-numbers-after-self

Binary Indexed Tree

0315-count-of-smaller-numbers-after-self

Merge Sort

0315-count-of-smaller-numbers-after-self

Ordered Set

0315-count-of-smaller-numbers-after-self

Treap

0315-count-of-smaller-numbers-after-self

Boyer–Moore Majority Vote Algorithm

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

Minimax

1140-stone-game-ii
1406-stone-game-iii
2029-stone-game-ix

Zero-Sum Game

1140-stone-game-ii
1406-stone-game-iii
2029-stone-game-ix

Binary Search Tree

0099-recover-binary-search-tree

Nim Game

2029-stone-game-ix

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages