Skip to content

Hyunsujk/leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

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

LeetCode Topics

Array

0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0015-3sum
0033-search-in-rotated-sorted-array
0036-valid-sudoku
0039-combination-sum
0042-trapping-rain-water
0048-rotate-image
0049-group-anagrams
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0066-plus-one
0068-text-justification
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0084-largest-rectangle-in-histogram
0088-merge-sorted-array
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0136-single-number
0139-word-break
0150-evaluate-reverse-polish-notation
0152-maximum-product-subarray
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0200-number-of-islands
0212-word-search-ii
0213-house-robber-ii
0217-contains-duplicate
0238-product-of-array-except-self
0252-meeting-rooms
0253-meeting-rooms-ii
0268-missing-number
0271-encode-and-decode-strings
0300-longest-increasing-subsequence
0322-coin-change
0347-top-k-frequent-elements
0417-pacific-atlantic-water-flow
0435-non-overlapping-intervals
0539-minimum-time-difference
0723-candy-crush
0739-daily-temperatures
0747-min-cost-climbing-stairs
0792-binary-search
0883-car-fleet
0907-koko-eating-bananas
1034-subarrays-with-k-different-integers
1570-final-prices-with-a-special-discount-in-a-shop
1866-restore-the-array-from-adjacent-pairs
1972-rotating-the-box
2075-brightest-position-on-street
2169-simple-bank-system
2779-number-of-adjacent-elements-with-the-same-color
2889-number-of-black-blocks
3269-number-of-subarrays-that-match-a-pattern-i
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix
3335-minimum-operations-to-write-the-letter-y-on-a-grid

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0036-valid-sudoku
0049-group-anagrams
0073-set-matrix-zeroes
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0128-longest-consecutive-sequence
0133-clone-graph
0139-word-break
0141-linked-list-cycle
0146-lru-cache
0202-happy-number
0208-implement-trie-prefix-tree
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0424-longest-repeating-character-replacement
0567-permutation-in-string
1023-time-based-key-value-store
1034-subarrays-with-k-different-integers
1866-restore-the-array-from-adjacent-pairs
2169-simple-bank-system
2889-number-of-black-blocks
3329-find-the-length-of-the-longest-common-prefix
3335-minimum-operations-to-write-the-letter-y-on-a-grid

Union Find

0128-longest-consecutive-sequence
0200-number-of-islands
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph

String

0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0068-text-justification
0071-simplify-path
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0125-valid-palindrome
0139-word-break
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0242-valid-anagram
0257-binary-tree-paths
0271-encode-and-decode-strings
0424-longest-repeating-character-replacement
0539-minimum-time-difference
0567-permutation-in-string
0647-palindromic-substrings
1023-time-based-key-value-store
1250-longest-common-subsequence
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix

Sliding Window

0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0424-longest-repeating-character-replacement
0567-permutation-in-string
1034-subarrays-with-k-different-integers

Binary Search

0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0268-missing-number
0300-longest-increasing-subsequence
0792-binary-search
0907-koko-eating-bananas
1023-time-based-key-value-store

Divide and Conquer

0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0347-top-k-frequent-elements

Two Pointers

0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0088-merge-sorted-array
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0253-meeting-rooms-ii
0567-permutation-in-string
0647-palindromic-substrings
0723-candy-crush
1972-rotating-the-box

Dynamic Programming

0005-longest-palindromic-substring
0022-generate-parentheses
0042-trapping-rain-water
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0070-climbing-stairs
0091-decode-ways
0121-best-time-to-buy-and-sell-stock
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0300-longest-increasing-subsequence
0322-coin-change
0435-non-overlapping-intervals
0647-palindromic-substrings
0747-min-cost-climbing-stairs
1013-fibonacci-number
1250-longest-common-subsequence

Depth-First Search

0079-word-search
0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0133-clone-graph
0200-number-of-islands
0207-course-schedule
0211-design-add-and-search-words-data-structure
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph
0417-pacific-atlantic-water-flow
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
1866-restore-the-array-from-adjacent-pairs

Breadth-First Search

0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0133-clone-graph
0200-number-of-islands
0207-course-schedule
0226-invert-binary-tree
0261-graph-valid-tree
0322-coin-change
0323-number-of-connected-components-in-an-undirected-graph
0417-pacific-atlantic-water-flow

Graph

0133-clone-graph
0207-course-schedule
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0088-merge-sorted-array
0217-contains-duplicate
0242-valid-anagram
0252-meeting-rooms
0253-meeting-rooms-ii
0268-missing-number
0347-top-k-frequent-elements
0435-non-overlapping-intervals
0539-minimum-time-difference
0883-car-fleet
2075-brightest-position-on-street

Greedy

0011-container-with-most-water
0055-jump-game
0253-meeting-rooms-ii
0435-non-overlapping-intervals

Trie

0139-word-break
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i
3329-find-the-length-of-the-longest-common-prefix

Memoization

0070-climbing-stairs
0139-word-break
1013-fibonacci-number

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list

Math

0002-add-two-numbers
0048-rotate-image
0062-unique-paths
0066-plus-one
0070-climbing-stairs
0150-evaluate-reverse-polish-notation
0202-happy-number
0268-missing-number
0371-sum-of-two-integers
0539-minimum-time-difference
1013-fibonacci-number
2288-count-operations-to-obtain-zero

Bit Manipulation

0136-single-number
0268-missing-number
0371-sum-of-two-integers

Stack

0020-valid-parentheses
0042-trapping-rain-water
0071-simplify-path
0084-largest-rectangle-in-histogram
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0739-daily-temperatures
0883-car-fleet
1570-final-prices-with-a-special-discount-in-a-shop

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0143-reorder-list
0206-reverse-linked-list
1013-fibonacci-number

Design

0146-lru-cache
0155-min-stack
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0271-encode-and-decode-strings
1023-time-based-key-value-store
2169-simple-bank-system

Heap (Priority Queue)

0023-merge-k-sorted-lists
0253-meeting-rooms-ii
0347-top-k-frequent-elements

Merge Sort

0023-merge-k-sorted-lists

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements
1034-subarrays-with-k-different-integers
3335-minimum-operations-to-write-the-letter-y-on-a-grid

Quickselect

0347-top-k-frequent-elements

Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0543-diameter-of-binary-tree
0572-subtree-of-another-tree

String Matching

0572-subtree-of-another-tree
3269-number-of-subarrays-that-match-a-pattern-i
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0543-diameter-of-binary-tree
0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree
3269-number-of-subarrays-that-match-a-pattern-i
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i

Matrix

0036-valid-sudoku
0048-rotate-image
0054-spiral-matrix
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0200-number-of-islands
0212-word-search-ii
0417-pacific-atlantic-water-flow
0723-candy-crush
1972-rotating-the-box
3335-minimum-operations-to-write-the-letter-y-on-a-grid

Backtracking

0022-generate-parentheses
0039-combination-sum
0079-word-search
0212-word-search-ii
0257-binary-tree-paths

Simulation

0054-spiral-matrix
0068-text-justification
0723-candy-crush
2169-simple-bank-system
2288-count-operations-to-obtain-zero

Combinatorics

0062-unique-paths

Topological Sort

0207-course-schedule

Binary Search Tree

0098-validate-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree

Prefix Sum

0238-product-of-array-except-self
0253-meeting-rooms-ii
2075-brightest-position-on-street

Rolling Hash

3269-number-of-subarrays-that-match-a-pattern-i
3305-count-prefix-and-suffix-pairs-ii
3309-count-prefix-and-suffix-pairs-i

Doubly-Linked List

0146-lru-cache

Enumeration

2889-number-of-black-blocks

Monotonic Stack

0042-trapping-rain-water
0084-largest-rectangle-in-histogram
0739-daily-temperatures
0883-car-fleet
1570-final-prices-with-a-special-discount-in-a-shop

Ordered Set

2075-brightest-position-on-street

About

A collection of LeetCode questions to ace the coding interview! - Created using [LeetHub v2](https://github.com/arunbhardwaj/LeetHub-2.0)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published