Skip to content

kimpra2989/leet-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leet-code

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

LeetCode Topics

Database

0175-combine-two-tables
0181-employees-earning-more-than-their-managers
0577-employee-bonus
0584-find-customer-referee
0585-investments-in-2016
0586-customer-placing-the-largest-number-of-orders
0595-big-countries
0596-classes-with-at-least-5-students
0620-not-boring-movies
1141-user-activity-for-the-past-30-days-i
1153-product-sales-analysis-i
1193-monthly-transactions-i
1258-article-views-i
1509-replace-employee-id-with-the-unique-identifier
1827-invalid-tweets

Hash Table

0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0202-happy-number
0208-implement-trie-prefix-tree
0242-valid-anagram
0740-delete-and-earn
0768-partition-labels
1218-lowest-common-ancestor-of-deepest-leaves
1319-unique-number-of-occurrences
1387-find-elements-in-a-contaminated-binary-tree
1392-find-the-difference-of-two-arrays
1512-design-underground-system
1612-avoid-flood-in-the-city
1777-determine-if-two-strings-are-close
1798-max-number-of-k-sum-pairs
2107-find-unique-binary-string
2220-find-all-possible-recipes-from-given-supplies
2428-equal-row-and-column-pairs
2429-design-a-food-rating-system
2707-merge-two-2d-arrays-by-summing-values
3227-find-missing-and-repeated-values
3797-design-spreadsheet

String

0017-letter-combinations-of-a-phone-number
0049-group-anagrams
0071-simplify-path
0151-reverse-words-in-a-string
0208-implement-trie-prefix-tree
0242-valid-anagram
0345-reverse-vowels-of-a-string
0392-is-subsequence
0768-partition-labels
1093-recover-a-tree-from-preorder-traversal
1146-greatest-common-divisor-of-strings
1397-search-suggestions-system
1512-design-underground-system
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1777-determine-if-two-strings-are-close
1894-merge-strings-alternately
2021-remove-all-occurrences-of-a-substring
2107-find-unique-binary-string
2197-decode-the-slanted-ciphertext
2220-find-all-possible-recipes-from-given-supplies
2346-largest-3-same-digit-number-in-string
2429-design-a-food-rating-system
2463-minimum-recolors-to-get-k-consecutive-black-blocks
2470-removing-stars-from-a-string
2483-minimum-penalty-for-a-shop
2492-length-of-the-longest-alphabetical-continuous-substring
3797-design-spreadsheet

Sorting

0049-group-anagrams
0215-kth-largest-element-in-an-array
0242-valid-anagram
0368-largest-divisible-subset
0435-non-overlapping-intervals
0452-minimum-number-of-arrows-to-burst-balloons
0611-valid-triangle-number
1397-search-suggestions-system
1503-reducing-dishes
1777-determine-if-two-strings-are-close
1798-max-number-of-k-sum-pairs
2245-destroying-asteroids
2392-successful-pairs-of-spells-and-potions
2588-maximum-number-of-points-from-grid-queries
2636-maximum-subsequence-score
2846-robot-collisions
3657-check-if-grid-can-be-cut-into-sections

Counting

1777-determine-if-two-strings-are-close
2614-maximum-count-of-positive-integer-and-negative-integer

Array

0011-container-with-most-water
0036-valid-sudoku
0045-jump-game-ii
0049-group-anagrams
0055-jump-game
0063-unique-paths-ii
0066-plus-one
0074-search-a-2d-matrix
0120-triangle
0136-single-number
0137-single-number-ii
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0215-kth-largest-element-in-an-array
0216-combination-sum-iii
0238-product-of-array-except-self
0260-single-number-iii
0283-move-zeroes
0368-largest-divisible-subset
0435-non-overlapping-intervals
0452-minimum-number-of-arrows-to-burst-balloons
0605-can-place-flowers
0611-valid-triangle-number
0643-maximum-average-subarray-i
0724-find-pivot-index
0735-asteroid-collision
0740-delete-and-earn
0747-min-cost-climbing-stairs
0794-swim-in-rising-water
0945-snakes-and-ladders
1036-rotting-oranges
1046-max-consecutive-ones-iii
1319-unique-number-of-occurrences
1392-find-the-difference-of-two-arrays
1397-search-suggestions-system
1477-product-of-the-last-k-numbers
1503-reducing-dishes
1528-kids-with-the-greatest-number-of-candies
1586-longest-subarray-of-1s-after-deleting-one-element
1612-avoid-flood-in-the-city
1798-max-number-of-k-sum-pairs
1833-find-the-highest-altitude
1849-maximum-absolute-sum-of-any-subarray
1872-can-you-eat-your-favorite-candy-on-your-favorite-day
1993-sum-of-all-subset-xor-totals
2038-nearest-exit-from-entrance-in-maze
2107-find-unique-binary-string
2220-find-all-possible-recipes-from-given-supplies
2245-destroying-asteroids
2262-solving-questions-with-brainpower
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2324-find-triangular-sum-of-an-array
2392-successful-pairs-of-spells-and-potions
2428-equal-row-and-column-pairs
2429-design-a-food-rating-system
2551-apply-operations-to-an-array
2588-maximum-number-of-points-from-grid-queries
2614-maximum-count-of-positive-integer-and-negative-integer
2636-maximum-subsequence-score
2707-merge-two-2d-arrays-by-summing-values
2846-robot-collisions
3152-maximum-value-of-an-ordered-triplet-ii
3154-maximum-value-of-an-ordered-triplet-i
3227-find-missing-and-repeated-values
3251-maximum-area-of-longest-diagonal-rectangle
3331-minimum-operations-to-exceed-threshold-value-i
3383-taking-maximum-energy-from-the-mystic-dungeon
3429-special-array-i
3483-alternating-groups-ii
3627-find-minimum-time-to-reach-last-room-i
3657-check-if-grid-can-be-cut-into-sections
3794-find-the-minimum-amount-of-time-to-brew-potions
3797-design-spreadsheet

Dynamic Programming

0045-jump-game-ii
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0120-triangle
0198-house-robber
0338-counting-bits
0368-largest-divisible-subset
0392-is-subsequence
0435-non-overlapping-intervals
0740-delete-and-earn
0747-min-cost-climbing-stairs
1236-n-th-tribonacci-number
1503-reducing-dishes
1586-longest-subarray-of-1s-after-deleting-one-element
1849-maximum-absolute-sum-of-any-subarray
2262-solving-questions-with-brainpower

Two Pointers

0011-container-with-most-water
0086-partition-list
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0283-move-zeroes
0345-reverse-vowels-of-a-string
0392-is-subsequence
0611-valid-triangle-number
0768-partition-labels
1798-max-number-of-k-sum-pairs
1894-merge-strings-alternately
2216-delete-the-middle-node-of-a-linked-list
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2392-successful-pairs-of-spells-and-potions
2551-apply-operations-to-an-array
2588-maximum-number-of-points-from-grid-queries
2707-merge-two-2d-arrays-by-summing-values

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0435-non-overlapping-intervals
0452-minimum-number-of-arrows-to-burst-balloons
0605-can-place-flowers
0611-valid-triangle-number
0768-partition-labels
1503-reducing-dishes
1612-avoid-flood-in-the-city
2245-destroying-asteroids
2636-maximum-subsequence-score

Stack

0071-simplify-path
0735-asteroid-collision
0937-online-stock-span
2021-remove-all-occurrences-of-a-substring
2470-removing-stars-from-a-string
2846-robot-collisions

Simulation

0735-asteroid-collision
1642-water-bottles
2021-remove-all-occurrences-of-a-substring
2197-decode-the-slanted-ciphertext
2265-partition-array-according-to-given-pivot
2271-rearrange-array-elements-by-sign
2324-find-triangular-sum-of-an-array
2428-equal-row-and-column-pairs
2470-removing-stars-from-a-string
2551-apply-operations-to-an-array
2846-robot-collisions
3336-water-bottles-ii
3794-find-the-minimum-amount-of-time-to-brew-potions

Prefix Sum

0238-product-of-array-except-self
0724-find-pivot-index
1046-max-consecutive-ones-iii
1477-product-of-the-last-k-numbers
1833-find-the-highest-altitude
1872-can-you-eat-your-favorite-candy-on-your-favorite-day
2483-minimum-penalty-for-a-shop
3383-taking-maximum-energy-from-the-mystic-dungeon
3794-find-the-minimum-amount-of-time-to-brew-potions

Sliding Window

0643-maximum-average-subarray-i
1046-max-consecutive-ones-iii
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1586-longest-subarray-of-1s-after-deleting-one-element
2463-minimum-recolors-to-get-k-consecutive-black-blocks
3483-alternating-groups-ii

Bit Manipulation

0136-single-number
0137-single-number-ii
0260-single-number-iii
0338-counting-bits
1441-minimum-flips-to-make-a-or-b-equal-to-c
1993-sum-of-all-subset-xor-totals

Matrix

0036-valid-sudoku
0063-unique-paths-ii
0074-search-a-2d-matrix
0794-swim-in-rising-water
0945-snakes-and-ladders
1036-rotting-oranges
2038-nearest-exit-from-entrance-in-maze
2428-equal-row-and-column-pairs
2588-maximum-number-of-points-from-grid-queries
3227-find-missing-and-repeated-values
3627-find-minimum-time-to-reach-last-room-i
3797-design-spreadsheet

Math

0002-add-two-numbers
0009-palindrome-number
0062-unique-paths
0066-plus-one
0172-factorial-trailing-zeroes
0202-happy-number
0326-power-of-three
0368-largest-divisible-subset
1146-greatest-common-divisor-of-strings
1236-n-th-tribonacci-number
1477-product-of-the-last-k-numbers
1642-water-bottles
1889-check-if-number-is-a-sum-of-powers-of-three
1993-sum-of-all-subset-xor-totals
2324-find-triangular-sum-of-an-array
2610-closest-prime-numbers-in-range
2649-count-total-number-of-colored-cells
3227-find-missing-and-repeated-values
3336-water-bottles-ii

Design

0208-implement-trie-prefix-tree
0937-online-stock-span
0969-number-of-recent-calls
1387-find-elements-in-a-contaminated-binary-tree
1477-product-of-the-last-k-numbers
1512-design-underground-system
2429-design-a-food-rating-system
3797-design-spreadsheet

Data Stream

0937-online-stock-span
0969-number-of-recent-calls
1477-product-of-the-last-k-numbers

Linked List

0002-add-two-numbers
0086-partition-list
0206-reverse-linked-list
0328-odd-even-linked-list
2216-delete-the-middle-node-of-a-linked-list

Recursion

0002-add-two-numbers
0206-reverse-linked-list
0326-power-of-three

Tree

0100-same-tree
0104-maximum-depth-of-binary-tree
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1093-recover-a-tree-from-preorder-traversal
1116-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
1544-count-good-nodes-in-binary-tree

Depth-First Search

0100-same-tree
0104-maximum-depth-of-binary-tree
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0547-number-of-provinces
0794-swim-in-rising-water
0871-keys-and-rooms
0904-leaf-similar-trees
1093-recover-a-tree-from-preorder-traversal
1116-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
1544-count-good-nodes-in-binary-tree
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Breadth-First Search

0100-same-tree
0104-maximum-depth-of-binary-tree
0199-binary-tree-right-side-view
0547-number-of-provinces
0794-swim-in-rising-water
0871-keys-and-rooms
0945-snakes-and-ladders
1036-rotting-oranges
1116-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
1544-count-good-nodes-in-binary-tree
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero
2038-nearest-exit-from-entrance-in-maze
2588-maximum-number-of-points-from-grid-queries

Binary Tree

0100-same-tree
0104-maximum-depth-of-binary-tree
0199-binary-tree-right-side-view
0236-lowest-common-ancestor-of-a-binary-tree
0783-search-in-a-binary-search-tree
0904-leaf-similar-trees
1093-recover-a-tree-from-preorder-traversal
1116-maximum-level-sum-of-a-binary-tree
1218-lowest-common-ancestor-of-deepest-leaves
1387-find-elements-in-a-contaminated-binary-tree
1544-count-good-nodes-in-binary-tree

Backtracking

0017-letter-combinations-of-a-phone-number
0077-combinations
0216-combination-sum-iii
1516-the-k-th-lexicographical-string-of-all-happy-strings-of-length-n
1993-sum-of-all-subset-xor-totals
2107-find-unique-binary-string

Queue

0969-number-of-recent-calls

Graph

0547-number-of-provinces
0871-keys-and-rooms
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero
2220-find-all-possible-recipes-from-given-supplies
3627-find-minimum-time-to-reach-last-room-i

Union Find

0547-number-of-provinces
0794-swim-in-rising-water
2588-maximum-number-of-points-from-grid-queries

Memoization

1236-n-th-tribonacci-number

Combinatorics

0062-unique-paths
1993-sum-of-all-subset-xor-totals
2324-find-triangular-sum-of-an-array

Binary Search Tree

0074-search-a-2d-matrix
0162-find-peak-element
0167-two-sum-ii-input-array-is-sorted
0374-guess-number-higher-or-lower
0611-valid-triangle-number
0783-search-in-a-binary-search-tree
0794-swim-in-rising-water
1046-max-consecutive-ones-iii
1397-search-suggestions-system
1612-avoid-flood-in-the-city
2392-successful-pairs-of-spells-and-potions
2614-maximum-count-of-positive-integer-and-negative-integer

Trie

0208-implement-trie-prefix-tree
1397-search-suggestions-system

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0794-swim-in-rising-water
1397-search-suggestions-system
1612-avoid-flood-in-the-city
2429-design-a-food-rating-system
2588-maximum-number-of-points-from-grid-queries
2636-maximum-subsequence-score
3627-find-minimum-time-to-reach-last-room-i

Monotonic Stack

0937-online-stock-span

Number Theory

2610-closest-prime-numbers-in-range

Interactive

0374-guess-number-higher-or-lower

Divide and Conquer

0215-kth-largest-element-in-an-array

Quickselect

0215-kth-largest-element-in-an-array

Topological Sort

2220-find-all-possible-recipes-from-given-supplies

Enumeration

1993-sum-of-all-subset-xor-totals

Shortest Path

3627-find-minimum-time-to-reach-last-room-i

Ordered Set

2429-design-a-food-rating-system

About

리트 코드 저장소

Topics

Resources

Stars

Watchers

Forks