Skip to content
dej0ePublic

About

Documenting the leetcode grind. I am DFS-ing using leetcode, neetcode and algomonster

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

1,400 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leetcode

LeetCode Stats

LeetCode Topics

Hash Table

Problem Name Difficulty
0001-two-sum
0003-longest-substring-without-repeating-characters
0017-letter-combinations-of-a-phone-number
0036-valid-sudoku
0049-group-anagrams
0076-minimum-window-substring
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0127-word-ladder
0128-longest-consecutive-sequence
0133-clone-graph
0138-copy-list-with-random-pointer
0139-word-break
0141-linked-list-cycle
0146-lru-cache
0208-implement-trie-prefix-tree
0314-binary-tree-vertical-order-traversal
0347-top-k-frequent-elements
0355-design-twitter
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0567-permutation-in-string
0621-task-scheduler
0753-open-the-lock
0763-partition-labels
0846-hand-of-straights
0981-time-based-key-value-store
2516-take-k-of-each-character-from-left-and-right

String

Problem Name Difficulty
0003-longest-substring-without-repeating-characters
0005-longest-palindromic-substring
0014-longest-common-prefix
0017-letter-combinations-of-a-phone-number
0020-valid-parentheses
0022-generate-parentheses
0049-group-anagrams
0076-minimum-window-substring
0079-word-search
0091-decode-ways
0093-restore-ip-addresses
0125-valid-palindrome
0127-word-ladder
0131-palindrome-partitioning
0139-word-break
0151-reverse-words-in-a-string
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii
0257-binary-tree-paths
0271-encode-and-decode-strings
0297-serialize-and-deserialize-binary-tree
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0567-permutation-in-string
0647-palindromic-substrings
0680-valid-palindrome-ii
0753-open-the-lock
0763-partition-labels
0981-time-based-key-value-store
1143-longest-common-subsequence
2516-take-k-of-each-character-from-left-and-right

Backtracking

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

Dynamic Programming

Problem Name Difficulty
0005-longest-palindromic-substring
0022-generate-parentheses
0042-trapping-rain-water
0045-jump-game-ii
0053-maximum-subarray
0055-jump-game
0062-unique-paths
0064-minimum-path-sum
0070-climbing-stairs
0091-decode-ways
0124-binary-tree-maximum-path-sum
0131-palindrome-partitioning
0139-word-break
0152-maximum-product-subarray
0198-house-robber
0213-house-robber-ii
0221-maximal-square
0300-longest-increasing-subsequence
0322-coin-change
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0435-non-overlapping-intervals
0647-palindromic-substrings
0746-min-cost-climbing-stairs
0918-maximum-sum-circular-subarray
0978-longest-turbulent-subarray
1143-longest-common-subsequence

Array

Problem Name Difficulty
0001-two-sum
0004-median-of-two-sorted-arrays
0011-container-with-most-water
0014-longest-common-prefix
0015-3sum
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0036-valid-sudoku
0039-combination-sum
0040-combination-sum-ii
0042-trapping-rain-water
0045-jump-game-ii
0046-permutations
0049-group-anagrams
0051-n-queens
0053-maximum-subarray
0054-spiral-matrix
0055-jump-game
0056-merge-intervals
0057-insert-interval
0064-minimum-path-sum
0074-search-a-2d-matrix
0078-subsets
0079-word-search
0090-subsets-ii
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0128-longest-consecutive-sequence
0130-surrounded-regions
0134-gas-station
0139-word-break
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
0215-kth-largest-element-in-an-array
0221-maximal-square
0238-product-of-array-except-self
0239-sliding-window-maximum
0252-meeting-rooms
0253-meeting-rooms-ii
0271-encode-and-decode-strings
0283-move-zeroes
0286-walls-and-gates
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0322-coin-change
0347-top-k-frequent-elements
0368-largest-divisible-subset
0416-partition-equal-subset-sum
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0435-non-overlapping-intervals
0444-sequence-reconstruction
0540-single-element-in-a-sorted-array
0621-task-scheduler
0695-max-area-of-island
0704-binary-search Easy
0729-my-calendar-i
0733-flood-fill
0739-daily-temperatures
0746-min-cost-climbing-stairs
0753-open-the-lock
0792-binary-search
0827-making-a-large-island
0846-hand-of-straights
0853-car-fleet
0875-koko-eating-bananas
0907-koko-eating-bananas
0918-maximum-sum-circular-subarray
0973-k-closest-points-to-origin
0978-longest-turbulent-subarray
0994-rotting-oranges
1036-rotting-oranges
1046-last-stone-weight
1091-shortest-path-in-binary-matrix
1475-final-prices-with-a-special-discount-in-a-shop
1514-path-with-maximum-probability
1584-min-cost-to-connect-all-points
1899-merge-triplets-to-form-target-triplet
2530-maximal-score-after-applying-k-operations

Trie

Problem Name Difficulty
0014-longest-common-prefix
0139-word-break
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0212-word-search-ii

Memoization

Problem Name Difficulty
0070-climbing-stairs
0139-word-break

Breadth-First Search

Problem Name Difficulty
0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0116-populating-next-right-pointers-in-each-node
0127-word-ladder
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
0226-invert-binary-tree
0261-graph-valid-tree
0286-walls-and-gates
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0322-coin-change
0323-number-of-connected-components-in-an-undirected-graph
0417-pacific-atlantic-water-flow
0684-redundant-connection
0695-max-area-of-island
0733-flood-fill
0743-network-delay-time
0753-open-the-lock
0827-making-a-large-island
0841-keys-and-rooms
0994-rotting-oranges
1036-rotting-oranges
1091-shortest-path-in-binary-matrix
1142-minimum-knight-moves
1448-count-good-nodes-in-binary-tree
1544-count-good-nodes-in-binary-tree
2415-reverse-odd-levels-of-binary-tree

Tree

Problem Name Difficulty
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0124-binary-tree-maximum-path-sum
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
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0703-kth-largest-element-in-a-stream
0784-insert-into-a-binary-search-tree
1038-binary-search-tree-to-greater-sum-tree
1448-count-good-nodes-in-binary-tree
1544-count-good-nodes-in-binary-tree
2415-reverse-odd-levels-of-binary-tree

Depth-First Search

Problem Name Difficulty
0079-word-search
0098-validate-binary-search-tree
0100-same-tree
0104-maximum-depth-of-binary-tree
0110-balanced-binary-tree
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0124-binary-tree-maximum-path-sum
0130-surrounded-regions
0133-clone-graph
0199-binary-tree-right-side-view
0200-number-of-islands
0207-course-schedule
0210-course-schedule-ii
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
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0261-graph-valid-tree
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0323-number-of-connected-components-in-an-undirected-graph
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0684-redundant-connection
0695-max-area-of-island
0733-flood-fill
0743-network-delay-time
0827-making-a-large-island
0841-keys-and-rooms
1038-binary-search-tree-to-greater-sum-tree
1448-count-good-nodes-in-binary-tree
1544-count-good-nodes-in-binary-tree
2415-reverse-odd-levels-of-binary-tree

Binary Tree

Problem Name Difficulty
0098-validate-binary-search-tree
0100-same-tree
0102-binary-tree-level-order-traversal
0103-binary-tree-zigzag-level-order-traversal
0104-maximum-depth-of-binary-tree
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0110-balanced-binary-tree
0113-path-sum-ii
0116-populating-next-right-pointers-in-each-node
0124-binary-tree-maximum-path-sum
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
0236-lowest-common-ancestor-of-a-binary-tree
0257-binary-tree-paths
0297-serialize-and-deserialize-binary-tree
0314-binary-tree-vertical-order-traversal
0450-delete-node-in-a-bst
0543-diameter-of-binary-tree
0572-subtree-of-another-tree
0703-kth-largest-element-in-a-stream
0784-insert-into-a-binary-search-tree
1038-binary-search-tree-to-greater-sum-tree
1448-count-good-nodes-in-binary-tree
1544-count-good-nodes-in-binary-tree
2415-reverse-odd-levels-of-binary-tree

Matrix

Problem Name Difficulty
0036-valid-sudoku
0054-spiral-matrix
0064-minimum-path-sum
0074-search-a-2d-matrix
0079-word-search
0130-surrounded-regions
0200-number-of-islands
0212-word-search-ii
0221-maximal-square
0286-walls-and-gates
0417-pacific-atlantic-water-flow
0419-battleships-in-a-board
0695-max-area-of-island
0733-flood-fill
0827-making-a-large-island
0994-rotting-oranges
1036-rotting-oranges
1091-shortest-path-in-binary-matrix

Union Find

Problem Name Difficulty
0130-surrounded-regions
0200-number-of-islands
0261-graph-valid-tree

Graph

Problem Name Difficulty
0207-course-schedule
0210-course-schedule-ii
0261-graph-valid-tree
0444-sequence-reconstruction

Topological Sort

Problem Name Difficulty
0207-course-schedule
0210-course-schedule-ii
0444-sequence-reconstruction

Math

Problem Name Difficulty
0002-add-two-numbers
0009-palindrome-number
0062-unique-paths
0070-climbing-stairs
0368-largest-divisible-subset
0973-k-closest-points-to-origin

Combinatorics

Problem Name Difficulty
0062-unique-paths

Sorting

Problem Name Difficulty
0015-3sum
0049-group-anagrams
0056-merge-intervals
0215-kth-largest-element-in-an-array
0252-meeting-rooms
0253-meeting-rooms-ii
0314-binary-tree-vertical-order-traversal
0347-top-k-frequent-elements
0368-largest-divisible-subset
0435-non-overlapping-intervals
0621-task-scheduler
0846-hand-of-straights
0853-car-fleet
0973-k-closest-points-to-origin

Binary Search

Problem Name Difficulty
0004-median-of-two-sorted-arrays
0033-search-in-rotated-sorted-array
0034-find-first-and-last-position-of-element-in-sorted-array
0074-search-a-2d-matrix
0153-find-minimum-in-rotated-sorted-array
0167-two-sum-ii-input-array-is-sorted
0287-find-the-duplicate-number
0300-longest-increasing-subsequence
0540-single-element-in-a-sorted-array
0704-binary-search Easy
0729-my-calendar-i
0792-binary-search
0875-koko-eating-bananas
0907-koko-eating-bananas
0981-time-based-key-value-store

Design

Problem Name Difficulty
0146-lru-cache
0155-min-stack
0208-implement-trie-prefix-tree
0211-design-add-and-search-words-data-structure
0271-encode-and-decode-strings
0297-serialize-and-deserialize-binary-tree
0355-design-twitter
0703-kth-largest-element-in-a-stream
0729-my-calendar-i
0981-time-based-key-value-store

Segment Tree

Problem Name Difficulty
0729-my-calendar-i

Ordered Set

Problem Name Difficulty
0729-my-calendar-i

Two Pointers

Problem Name Difficulty
0005-longest-palindromic-substring
0011-container-with-most-water
0015-3sum
0019-remove-nth-node-from-end-of-list
0042-trapping-rain-water
0125-valid-palindrome
0141-linked-list-cycle
0143-reorder-list
0151-reverse-words-in-a-string
0167-two-sum-ii-input-array-is-sorted
0253-meeting-rooms-ii
0283-move-zeroes
0287-find-the-duplicate-number
0567-permutation-in-string
0647-palindromic-substrings
0680-valid-palindrome-ii
0763-partition-labels
2095-delete-the-middle-node-of-a-linked-list

Greedy

Problem Name Difficulty
0011-container-with-most-water
0045-jump-game-ii
0055-jump-game
0134-gas-station
0253-meeting-rooms-ii
0435-non-overlapping-intervals
0621-task-scheduler
0680-valid-palindrome-ii
0763-partition-labels
0846-hand-of-straights
1899-merge-triplets-to-form-target-triplet
2530-maximal-score-after-applying-k-operations

Sliding Window

Problem Name Difficulty
0003-longest-substring-without-repeating-characters
0076-minimum-window-substring
0239-sliding-window-maximum
0424-longest-repeating-character-replacement
0438-find-all-anagrams-in-a-string
0567-permutation-in-string
0978-longest-turbulent-subarray
2516-take-k-of-each-character-from-left-and-right

Prefix Sum

Problem Name Difficulty
0238-product-of-array-except-self
0253-meeting-rooms-ii

String Matching

Problem Name Difficulty
0572-subtree-of-another-tree

Hash Function

Problem Name Difficulty
0572-subtree-of-another-tree

Binary Search Tree

Problem Name Difficulty
0098-validate-binary-search-tree
0230-kth-smallest-element-in-a-bst
0235-lowest-common-ancestor-of-a-binary-search-tree
0450-delete-node-in-a-bst
0703-kth-largest-element-in-a-stream
0784-insert-into-a-binary-search-tree
1038-binary-search-tree-to-greater-sum-tree

Bit Manipulation

Problem Name Difficulty
0078-subsets
0090-subsets-ii
0287-find-the-duplicate-number

Linked List

Problem Name Difficulty
0002-add-two-numbers
0019-remove-nth-node-from-end-of-list
0021-merge-two-sorted-lists
0023-merge-k-sorted-lists
0025-reverse-nodes-in-k-group
0116-populating-next-right-pointers-in-each-node
0138-copy-list-with-random-pointer
0141-linked-list-cycle
0143-reorder-list
0146-lru-cache
0355-design-twitter
2095-delete-the-middle-node-of-a-linked-list

Doubly-Linked List

Problem Name Difficulty
0146-lru-cache

Recursion

Problem Name Difficulty
0002-add-two-numbers
0021-merge-two-sorted-lists
0025-reverse-nodes-in-k-group
0143-reorder-list

Divide and Conquer

Problem Name Difficulty
0004-median-of-two-sorted-arrays
0023-merge-k-sorted-lists
0053-maximum-subarray
0105-construct-binary-tree-from-preorder-and-inorder-traversal
0215-kth-largest-element-in-an-array
0347-top-k-frequent-elements
0918-maximum-sum-circular-subarray
0973-k-closest-points-to-origin

Heap (Priority Queue)

Problem Name Difficulty
0023-merge-k-sorted-lists
0215-kth-largest-element-in-an-array
0239-sliding-window-maximum
0253-meeting-rooms-ii
0347-top-k-frequent-elements
0355-design-twitter
0621-task-scheduler
0703-kth-largest-element-in-a-stream
0743-network-delay-time
0973-k-closest-points-to-origin
1046-last-stone-weight
1514-path-with-maximum-probability
2530-maximal-score-after-applying-k-operations

Data Stream

Problem Name Difficulty
0703-kth-largest-element-in-a-stream

Geometry

Problem Name Difficulty
0973-k-closest-points-to-origin

Quickselect

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

Counting

Problem Name Difficulty
0347-top-k-frequent-elements
0621-task-scheduler

Graph Theory

Problem Name Difficulty
0133-clone-graph
0207-course-schedule
0210-course-schedule-ii
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph
0684-redundant-connection
0743-network-delay-time
0841-keys-and-rooms
1514-path-with-maximum-probability
1584-min-cost-to-connect-all-points

Union-Find

Problem Name Difficulty
0128-longest-consecutive-sequence
0130-surrounded-regions
0200-number-of-islands
0261-graph-valid-tree
0323-number-of-connected-components-in-an-undirected-graph
0684-redundant-connection
0695-max-area-of-island
0827-making-a-large-island
1584-min-cost-to-connect-all-points

Queue

Problem Name Difficulty
0239-sliding-window-maximum
0918-maximum-sum-circular-subarray

Monotonic Queue

Problem Name Difficulty
0239-sliding-window-maximum
0918-maximum-sum-circular-subarray

Stack

Problem Name Difficulty
0020-valid-parentheses
0042-trapping-rain-water
0143-reorder-list
0155-min-stack
0739-daily-temperatures
0853-car-fleet
1475-final-prices-with-a-special-discount-in-a-shop

Monotonic Stack

Problem Name Difficulty
0042-trapping-rain-water
0739-daily-temperatures
0853-car-fleet
1475-final-prices-with-a-special-discount-in-a-shop

Bucket Sort

Problem Name Difficulty
0347-top-k-frequent-elements

Shortest Path

Problem Name Difficulty
0743-network-delay-time
1514-path-with-maximum-probability

Minimum Spanning Tree

Problem Name Difficulty
1584-min-cost-to-connect-all-points

Merge Sort

Problem Name Difficulty
0023-merge-k-sorted-lists

Simulation

Problem Name Difficulty
0054-spiral-matrix

About

Documenting the leetcode grind. I am DFS-ing using leetcode, neetcode and algomonster

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Contributors

Languages