Skip to content

Latest commit

 

History

2,962 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

Collection of LeetCode questions

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
0040-combination-sum-ii
0041-first-missing-positive
0042-trapping-rain-water
0046-permutations
0048-rotate-image
0049-group-anagrams
0053-maximum-subarray
0054-spiral-matrix
0056-merge-intervals
0057-insert-interval
0066-plus-one
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0075-sort-colors
0078-subsets
0079-word-search
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0120-triangle
0121-best-time-to-buy-and-sell-stock
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0136-single-number
0150-evaluate-reverse-polish-notation
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0198-house-robber
0200-number-of-islands
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0238-product-of-array-except-self
0268-missing-number
0287-find-the-duplicate-number
0347-top-k-frequent-elements
0435-non-overlapping-intervals
0621-task-scheduler
0695-max-area-of-island
0704-binary-search
0720-longest-word-in-dictionary
0735-asteroid-collision
0739-daily-temperatures
0792-binary-search
0853-car-fleet
0875-koko-eating-bananas
0883-car-fleet
0907-koko-eating-bananas
0973-k-closest-points-to-origin
0994-rotting-oranges
1046-last-stone-weight
1094-car-pooling
1423-maximum-points-you-can-obtain-from-cards
1765-map-of-highest-peak
2013-detect-squares
2946-matrix-similarity-after-cyclic-shifts

Hash Table

0001-two-sum
0003-longest-substring-without-repeating-characters
0012-integer-to-roman
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0041-first-missing-positive
0049-group-anagrams
0073-set-matrix-zeroes
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0128-longest-consecutive-sequence
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0146-lru-cache
0202-happy-number
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0355-design-twitter
0424-longest-repeating-character-replacement
0567-permutation-in-string
0621-task-scheduler
0720-longest-word-in-dictionary
0791-custom-sort-string
0981-time-based-key-value-store
1023-time-based-key-value-store
2013-detect-squares

Sorting

0015-3sum
0049-group-anagrams
0056-merge-intervals
0075-sort-colors
0215-kth-largest-element-in-an-array
0217-contains-duplicate
0242-valid-anagram
0268-missing-number
0347-top-k-frequent-elements
0435-non-overlapping-intervals
0621-task-scheduler
0720-longest-word-in-dictionary
0791-custom-sort-string
0853-car-fleet
0883-car-fleet
0973-k-closest-points-to-origin
1094-car-pooling

String

0003-longest-substring-without-repeating-characters
0006-zigzag-conversion
0012-integer-to-roman
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0043-multiply-strings
0049-group-anagrams
0079-word-search
0093-restore-ip-addresses
0125-valid-palindrome
0131-palindrome-partitioning
0242-valid-anagram
0257-binary-tree-paths
0424-longest-repeating-character-replacement
0567-permutation-in-string
0720-longest-word-in-dictionary
0791-custom-sort-string
0981-time-based-key-value-store
1023-time-based-key-value-store
1208-get-equal-substrings-within-budget
2490-circular-sentence

Prefix Sum

0238-product-of-array-except-self
1094-car-pooling
1208-get-equal-substrings-within-budget
1423-maximum-points-you-can-obtain-from-cards

Union Find

0128-longest-consecutive-sequence

Linked List

0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0206-reverse-linked-list
0355-design-twitter
1367-linked-list-in-binary-tree

Two Pointers

0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0075-sort-colors
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0167-two-sum-ii-input-array-is-sorted
0202-happy-number
0287-find-the-duplicate-number
0567-permutation-in-string

Stack

0020-valid-parentheses
0042-trapping-rain-water
0143-reorder-list
0150-evaluate-reverse-polish-notation
0155-min-stack
0735-asteroid-collision
0739-daily-temperatures
0853-car-fleet
0883-car-fleet

Recursion

0002-add-two-numbers
0021-merge-two-sorted-lists
0050-powx-n
0143-reorder-list
0206-reverse-linked-list
1922-count-good-numbers

Divide and Conquer

0004-median-of-two-sorted-arrays
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0190-reverse-bits
0191-number-of-1-bits
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0973-k-closest-points-to-origin

Heap (Priority Queue)

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0355-design-twitter
0621-task-scheduler
0703-kth-largest-element-in-a-stream
0973-k-closest-points-to-origin
1046-last-stone-weight
1094-car-pooling

Bucket Sort

0347-top-k-frequent-elements

Counting

0347-top-k-frequent-elements
0621-task-scheduler
2013-detect-squares

Quickselect

0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0973-k-closest-points-to-origin

Matrix

0036-valid-sudoku
0048-rotate-image
0054-spiral-matrix
0073-set-matrix-zeroes
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0695-max-area-of-island
0994-rotting-oranges
1765-map-of-highest-peak
2946-matrix-similarity-after-cyclic-shifts

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
0287-find-the-duplicate-number
0704-binary-search
0792-binary-search
0875-koko-eating-bananas
0907-koko-eating-bananas
0981-time-based-key-value-store
1023-time-based-key-value-store
1208-get-equal-substrings-within-budget

Greedy

0011-container-with-most-water
0134-gas-station
0435-non-overlapping-intervals
0621-task-scheduler

Dynamic Programming

0022-generate-parentheses
0042-trapping-rain-water
0053-maximum-subarray
0120-triangle
0121-best-time-to-buy-and-sell-stock
0131-palindrome-partitioning
0198-house-robber
0338-counting-bits
0435-non-overlapping-intervals
0935-knight-dialer

Monotonic Stack

0042-trapping-rain-water
0739-daily-temperatures
0853-car-fleet
0883-car-fleet

Sliding Window

0003-longest-substring-without-repeating-characters
0424-longest-repeating-character-replacement
0567-permutation-in-string
1208-get-equal-substrings-within-budget
1423-maximum-points-you-can-obtain-from-cards

Design

0146-lru-cache
0155-min-stack
0355-design-twitter
0703-kth-largest-element-in-a-stream
0981-time-based-key-value-store
1023-time-based-key-value-store
2013-detect-squares

Backtracking

0017-letter-combinations-of-a-phone-number
0022-generate-parentheses
0039-combination-sum
0040-combination-sum-ii
0046-permutations
0078-subsets
0079-word-search
0090-subsets-ii
0093-restore-ip-addresses
0113-path-sum-ii
0131-palindrome-partitioning
0257-binary-tree-paths

Math

0002-add-two-numbers
0007-reverse-integer
0012-integer-to-roman
0043-multiply-strings
0048-rotate-image
0050-powx-n
0066-plus-one
0150-evaluate-reverse-polish-notation
0202-happy-number
0268-missing-number
0371-sum-of-two-integers
0973-k-closest-points-to-origin
1922-count-good-numbers
2946-matrix-similarity-after-cyclic-shifts

Bit Manipulation

0078-subsets
0090-subsets-ii
0136-single-number
0190-reverse-bits
0191-number-of-1-bits
0268-missing-number
0287-find-the-duplicate-number
0338-counting-bits
0371-sum-of-two-integers

Union-Find

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

Doubly-Linked List

0146-lru-cache

Simulation

0043-multiply-strings
0054-spiral-matrix
0735-asteroid-collision
1094-car-pooling
2946-matrix-similarity-after-cyclic-shifts

Data Stream

0703-kth-largest-element-in-a-stream
2013-detect-squares

Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-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
0112-path-sum
0113-path-sum-ii
0199-binary-tree-right-side-view
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
0662-maximum-width-of-binary-tree
0669-trim-a-binary-search-tree
0703-kth-largest-element-in-a-stream
1367-linked-list-in-binary-tree
1448-count-good-nodes-in-binary-tree

Binary Search Tree

0098-validate-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0669-trim-a-binary-search-tree
0703-kth-largest-element-in-a-stream

Binary Tree

0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-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
0112-path-sum
0113-path-sum-ii
0199-binary-tree-right-side-view
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
0662-maximum-width-of-binary-tree
0669-trim-a-binary-search-tree
0703-kth-largest-element-in-a-stream
1367-linked-list-in-binary-tree
1448-count-good-nodes-in-binary-tree

Geometry

0973-k-closest-points-to-origin

Depth-First Search

0079-word-search
0098-validate-binary-search-tree
0100-same-tree
0101-symmetric-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0112-path-sum
0113-path-sum-ii
0130-surrounded-regions
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0226-invert-binary-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0257-binary-tree-paths
0386-lexicographical-numbers
0543-diameter-of-binary-tree
0547-number-of-provinces
0572-subtree-of-another-tree
0662-maximum-width-of-binary-tree
0669-trim-a-binary-search-tree
0695-max-area-of-island
1367-linked-list-in-binary-tree
1448-count-good-nodes-in-binary-tree

Breadth-First Search

0100-same-tree
0101-symmetric-tree
0102-binary-tree-level-order-traversal
0104-maximum-depth-of-binary-tree
0112-path-sum
0130-surrounded-regions
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0226-invert-binary-tree
0547-number-of-provinces
0662-maximum-width-of-binary-tree
0695-max-area-of-island
0994-rotting-oranges
1448-count-good-nodes-in-binary-tree
1765-map-of-highest-peak

String Matching

0572-subtree-of-another-tree

Hash Function

0572-subtree-of-another-tree

Trie

0386-lexicographical-numbers
0720-longest-word-in-dictionary

Graph Theory

0207-course-schedule
0547-number-of-provinces

Topological Sort

0207-course-schedule

About

Collection of LeetCode questions to ace the coding interview!

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages