Skip to content

byung-chul/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

553 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

Collection of LeetCode questions to ace the coding interview! - Created using LeetHub

LeetCode Topics

Array

0001-two-sum
0011-container-with-most-water
0015-3sum
0027-remove-element
0036-valid-sudoku
0045-jump-game-ii
0049-group-anagrams
0055-jump-game
0056-merge-intervals
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0080-remove-duplicates-from-sorted-array-ii
0122-best-time-to-buy-and-sell-stock-ii
0128-longest-consecutive-sequence
0130-surrounded-regions
0139-word-break
0167-two-sum-ii-input-array-is-sorted
0169-majority-element
0189-rotate-array
0198-house-robber
0200-number-of-islands
0209-minimum-size-subarray-sum
0217-contains-duplicate
0219-contains-duplicate-ii
0228-summary-ranges
0238-product-of-array-except-self
0268-missing-number
0283-move-zeroes
0322-coin-change
0334-increasing-triplet-subsequence
0399-evaluate-division
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0463-island-perimeter
0529-minesweeper
0605-can-place-flowers
0643-maximum-average-subarray-i
0695-max-area-of-island
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0733-flood-fill
0735-asteroid-collision
0747-min-cost-climbing-stairs
0881-loud-and-rich
1036-rotting-oranges
1046-max-consecutive-ones-iii
1319-unique-number-of-occurrences
1392-find-the-difference-of-two-arrays
1528-kids-with-the-greatest-number-of-candies
1586-longest-subarray-of-1s-after-deleting-one-element
1798-max-number-of-k-sum-pairs
2038-nearest-exit-from-entrance-in-maze
2428-equal-row-and-column-pairs

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0027-remove-element
0080-remove-duplicates-from-sorted-array-ii
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0189-rotate-array
0202-happy-number
0283-move-zeroes
0345-reverse-vowels-of-a-string
0392-is-subsequence
0443-string-compression
1798-max-number-of-k-sum-pairs
1894-merge-strings-alternately

Math

0012-integer-to-roman
0013-roman-to-integer
0062-unique-paths
0070-climbing-stairs
0096-unique-binary-search-trees
0189-rotate-array
0202-happy-number
0264-ugly-number-ii
0268-missing-number
0279-perfect-squares
0365-water-and-jug-problem
0672-bulb-switcher-ii
1146-greatest-common-divisor-of-strings
1236-n-th-tribonacci-number

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0045-jump-game-ii
0055-jump-game
0062-unique-paths
0063-unique-paths-ii
0064-minimum-path-sum
0070-climbing-stairs
0072-edit-distance
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0122-best-time-to-buy-and-sell-stock-ii
0139-word-break
0198-house-robber
0264-ugly-number-ii
0279-perfect-squares
0322-coin-change
0392-is-subsequence
0714-best-time-to-buy-and-sell-stock-with-transaction-fee
0747-min-cost-climbing-stairs
0806-domino-and-tromino-tiling
1236-n-th-tribonacci-number
1250-longest-common-subsequence
1474-longest-zigzag-path-in-a-binary-tree
1586-longest-subarray-of-1s-after-deleting-one-element

Greedy

0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0122-best-time-to-buy-and-sell-stock-ii
0334-increasing-triplet-subsequence
0605-can-place-flowers
0714-best-time-to-buy-and-sell-stock-with-transaction-fee

Binary Search

0167-two-sum-ii-input-array-is-sorted
0209-minimum-size-subarray-sum
0268-missing-number
1046-max-consecutive-ones-iii

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0169-majority-element
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
1777-determine-if-two-strings-are-close
1798-max-number-of-k-sum-pairs

Sliding Window

0003-longest-substring-without-repeating-characters
0209-minimum-size-subarray-sum
0219-contains-duplicate-ii
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

Prefix Sum

0209-minimum-size-subarray-sum
0238-product-of-array-except-self
1046-max-consecutive-ones-iii

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0073-set-matrix-zeroes
0128-longest-consecutive-sequence
0133-clone-graph
0139-word-break
0169-majority-element
0202-happy-number
0205-isomorphic-strings
0217-contains-duplicate
0219-contains-duplicate-ii
0242-valid-anagram
0264-ugly-number-ii
0268-missing-number
0290-word-pattern
0383-ransom-note
1319-unique-number-of-occurrences
1392-find-the-difference-of-two-arrays
1777-determine-if-two-strings-are-close
1798-max-number-of-k-sum-pairs
2428-equal-row-and-column-pairs

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0012-integer-to-roman
0013-roman-to-integer
0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0049-group-anagrams
0072-edit-distance
0139-word-break
0151-reverse-words-in-a-string
0205-isomorphic-strings
0211-design-add-and-search-words-data-structure
0242-valid-anagram
0290-word-pattern
0345-reverse-vowels-of-a-string
0383-ransom-note
0392-is-subsequence
0399-evaluate-division
0443-string-compression
1146-greatest-common-divisor-of-strings
1250-longest-common-subsequence
1567-maximum-number-of-vowels-in-a-substring-of-given-length
1777-determine-if-two-strings-are-close
1894-merge-strings-alternately
2470-removing-stars-from-a-string

Counting

0169-majority-element
0383-ransom-note
1777-determine-if-two-strings-are-close

Union Find

0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0399-evaluate-division
0547-number-of-provinces
0695-max-area-of-island

Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0437-path-sum-iii
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1474-longest-zigzag-path-in-a-binary-tree
1544-count-good-nodes-in-binary-tree

Depth-First Search

0094-binary-tree-inorder-traversal
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0130-surrounded-regions
0133-clone-graph
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0200-number-of-islands
0211-design-add-and-search-words-data-structure
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0365-water-and-jug-problem
0386-lexicographical-numbers
0399-evaluate-division
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0437-path-sum-iii
0463-island-perimeter
0529-minesweeper
0547-number-of-provinces
0672-bulb-switcher-ii
0695-max-area-of-island
0733-flood-fill
0820-find-eventual-safe-states
0871-keys-and-rooms
0881-loud-and-rich
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1474-longest-zigzag-path-in-a-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
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0111-minimum-depth-of-binary-tree
0112-path-sum
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0226-invert-binary-tree
0279-perfect-squares
0322-coin-change
0365-water-and-jug-problem
0399-evaluate-division
0404-sum-of-left-leaves
0417-pacific-atlantic-water-flow
0463-island-perimeter
0529-minesweeper
0547-number-of-provinces
0672-bulb-switcher-ii
0695-max-area-of-island
0733-flood-fill
0820-find-eventual-safe-states
0871-keys-and-rooms
1036-rotting-oranges
1116-maximum-level-sum-of-a-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

Binary Tree

0094-binary-tree-inorder-traversal
0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0107-binary-tree-level-order-traversal-ii
0111-minimum-depth-of-binary-tree
0112-path-sum
0113-path-sum-ii
0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii
0129-sum-root-to-leaf-numbers
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0199-binary-tree-right-side-view
0226-invert-binary-tree
0236-lowest-common-ancestor-of-a-binary-tree
0404-sum-of-left-leaves
0437-path-sum-iii
0904-leaf-similar-trees
1116-maximum-level-sum-of-a-binary-tree
1474-longest-zigzag-path-in-a-binary-tree
1544-count-good-nodes-in-binary-tree

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0095-unique-binary-search-trees-ii
0113-path-sum-ii

Combinatorics

0062-unique-paths

Matrix

0036-valid-sudoku
0063-unique-paths-ii
0064-minimum-path-sum
0073-set-matrix-zeroes
0130-surrounded-regions
0200-number-of-islands
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0463-island-perimeter
0529-minesweeper
0695-max-area-of-island
0733-flood-fill
1036-rotting-oranges
2038-nearest-exit-from-entrance-in-maze
2428-equal-row-and-column-pairs

Memoization

0070-climbing-stairs
0139-word-break
1236-n-th-tribonacci-number

Binary Search Tree

0095-unique-binary-search-trees-ii
0096-unique-binary-search-trees
0098-validate-binary-search-tree

Linked List

0114-flatten-binary-tree-to-linked-list
0116-populating-next-right-pointers-in-each-node
0117-populating-next-right-pointers-in-each-node-ii

Graph

0133-clone-graph
0399-evaluate-division
0547-number-of-provinces
0820-find-eventual-safe-states
0871-keys-and-rooms
0881-loud-and-rich
1576-reorder-routes-to-make-all-paths-lead-to-the-city-zero

Stack

0094-binary-tree-inorder-traversal
0114-flatten-binary-tree-to-linked-list
0144-binary-tree-preorder-traversal
0145-binary-tree-postorder-traversal
0735-asteroid-collision
2470-removing-stars-from-a-string

Design

0211-design-add-and-search-words-data-structure

Trie

0139-word-break
0211-design-add-and-search-words-data-structure
0386-lexicographical-numbers

Bit Manipulation

0268-missing-number
0672-bulb-switcher-ii

Topological Sort

0820-find-eventual-safe-states
0881-loud-and-rich

Heap (Priority Queue)

0264-ugly-number-ii

Simulation

0735-asteroid-collision
2428-equal-row-and-column-pairs
2470-removing-stars-from-a-string

Shortest Path

0399-evaluate-division

Divide and Conquer

0169-majority-element

About

Collection of LeetCode questions to ace the coding interview! - Created using [LeetHub](https://github.com/QasimWani/LeetHub)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages