You are on page 1of 8

• Week 1: Easy questions + basic data structures + recursion

o Array questions
o Linked list questions
o Basic recursion
o the big O notation understanding lecture on weekend
o Questions:
▪ Day 1 (binary search continuation):
• Binary Search
o Question 704
• Find peak element
o Question 162
▪ Day 2 (array basics):
• Move Zeros
o Question 283
• Maximum subarray
o Question 53
▪ Day 3 (linked list basics):
• Middle of the linked list
o Question 876
• Delete node in a linked list
o Question 237
▪ Day 4 (recursion basics):
• Reverse integer
o Question 7
• Reverse linked list
o Question 206
▪ Day 5 (linked list cycle):
• Linked list cycle
o Question 141
• Linked list cycle II
o Question 142
▪ Day 6 (linked list advanced):
• Reorder list
o Question 143
• Palindrome linked list
o Question 234
• Week 2: Continuation of linked list + hash table
o Combination of linked list and hash table questions
o Design of hash table
o Questions:
▪ Day 1 (hash map):
• Two Sum
o Question 1
o Classic question, try understanding how to do it in one pass and
how the follow ups work. The follow ups include:
▪ Three Sum, Four Sum
▪ Two Sum sorted
▪ Two Sum in BST
▪ N sum complexity
• Happy number
o Question 202
▪ Day 2 (hash map cont.):
• Single number
o Question 136
• Group anagrams
o Question 49
▪ Day 3 (hash map cont.):
• Design HashMap
o Question 706
• Isomorphic strings
o Question 205
▪ Day 4 (hash map advanced):
• Insert delete get random O(1)
o Question 380
• LRU cache
o Question 146
o Very popular question, try understanding the question in depth
▪ Day 5 (hash map advanced cont.):
• Copy list with random pointers
o Question 138
• Longest consecutive sequence
o Question 128
• Week 3: Stack + Queue + Heap
o Questions:
▪ Day 1 (stack):
• Valid parentheses
o Question 20
• Backspace string compare
o Question 844
▪ Day 2 (stack cont.)
• Remove all adjacent duplicates in string
o Question 1047
• Flatten nested list iterator
o Question 341
▪ Day 3 (stack cont.)
• Next greater element II
o Question 503
• Decode string
o Question 394
▪ Day 4 (queue)
• Moving average from data stream
o Question 346
o Only worthwhile queue question in Leetcode, if you have
Leetcode premium, great; if not, skip it.
• Read n characters using read4
o Question 157
o Same as above
▪ Day 5 (heap)
• Top k frequent elements
o Question 347
• Kth largest element in a stream
o Question 703
▪ Day 6 (heap cont.)
• Merge k sorted list
o Question 23
• Sliding window maximum
o Question 239
▪ Day 7 (heap cont.)
• Meeting rooms II
o Question 253
o Good leetcode premium question, try doing it if you have
premium
• Last stone weight
o Question 1046
• Week 4: Tree
o Binary tree questions
o Multi-way tree questions
o Traversal questions
o Trie
o Questions:
▪ Day 1 (basic operations):
• Same Tree
o Question 100
• Delete node in a BST
o Question 450
▪ Day 2 (traversal):
• Binary tree in order traversal
o Question 94
• Construct binary tree from in order and post order traversal
o Question 106
▪ Day 3 (traversal):
• Construct binary tree from pre order and post order traversal
o Question 889
• Construct binary tree from in order and pre order traversal
o Question 105
▪ Day 4 (BST question):
• Symmetric tree
o Question 101
• Validate BST
o Question 98
▪ Day 5 (tree serialization)
• Serialize and deserialize a BST
o Question 449
• Serialize and deserialize a binary tree
o Question 297
▪ Day 6 (ancestor)
• Lowest common ancestor of a binary tree
o Question 236
• Maximum difference between node and ancestor
o Question 1026
▪ Day 7 (Trie):
• Implement Trie
o Question 208
o Very commonly tested, must know!
• Add and search word – data structure design
o Question 211
• Week 5: Graph
o BFS
o DFS
o Dijkstra's algorithm
o Questions:
▪ Day 1 (DFS find path):
• Evaluate division
o Question 399
• Key and rooms
o Question 841
▪ Day 2 (DFS find components):
• Number of islands
o Question 200
o Very classic, please understand it fully
• Find eventual safe states
o Question 802
▪ Day 3 (DFS find components + check cycle)
• Friend circles
o Question 547
• Course schedule
o Question 207
▪ Day 4 (DFS cont.)
• Max area of island
o Question 695
• Path sum II
o Question 113
▪ Day 5 (BFS finding # of levels):
• Flood fill
o Question 753
• 01 Matrix
o Question 542
▪ Day 6 (BFS cont.):
• Rotting oranges
o Question 994
• Binary tree level order traversal
o Question 102
▪ Day 7 (BFS cont.)
• Pacific Atlantic waterflow
o Question 417
• Snakes and ladder
o Question 909
▪ Day 8 (Dijkstra's algorithm):
• Word latter
o Question 127
• Network delay time
o Question 743
▪ Day 9 (topological order):
• Course schedule II
o Question 210
• Alien dictionary
o Question 269
o This question is a Leetcode premium question but it is a good
one, try doing it if you have Leetcode premium
▪ Day 10 (union find):
• Most stones removed with same row or column
o Question 947
• Minimize malware spread
o Question 924
• Week 6: Divide and conquer
o Binary search
o Sorting algorithms (merge and quick sort extensions)
o Generalized divide and conquer
o Questions:
▪ Day 1 (binary search easy):
• Peak element in mountain array
o Question 852
• Guess number higher or lower
o Question 374
▪ Day 2 (binary search easy cont.)
• Valid perfect squares
o Question 367
• Search insert position
o Question 35
▪ Day 3 (binary search advanced):
• Split array largest sum
o Question 410
o Very tricky, doesn’t seem like a binary search question at first,
don’t be discouraged
• Search in rotated sorted array II
o Question 81
▪ Day 4 (quick sort + merge sort)
• Quick select
o Question 215
• Count of smaller numbers after self
o Question 315
▪ Day 5 (generalized divide and conquer)
• Majority element
o Question 169
• Check completeness of a tree
o Question 958
▪ Day 6 (generalized divide and conquer cont.)
• Largest rectangle in histogram
o Question 84
o Try solving it using divide and conquer
• Skyline problem
o Question 218
• Week 7: Two pointers + Sliding window
o Two pointers
▪ Fast and slow pointers converging in the end
▪ Front and back pointers converging in the middle
o Sliding window
▪ Shifting window of objects
o Questions:
▪ Day 1 (fast and slow pointers)
• Remove duplicates
o Question 26
• Linked list cycle II
o Question 142
▪ Day 2 (pointer on two objects)
• Merge sorted array
o Question 88
• Squares of a sorted array
o Question 977
▪ Day 2 (front and back pointers)
• Two Sum sorted
o Question 167
• Container with the most water
o Question 11
▪ Day 3 (two pointers hard)
• Trapping rain water
o Question 42
• 3 Sum
o Question 15
▪ Day 4 (sliding window)
• Longest substring without repeating characters
o Question 3
• Fruit into baskets
o Question 904
▪ Day 5 (sliding window cont.)
• Minimum window substring
o Question 76
• Subarrays with K different integers
o Question 992
• Week 8: Backtracking + advanced topics
o Enumeration vs backtracking similarities and differences
o Advanced topics includes
▪ Dynamic programming
▪ Bit manipulation
o Questions:
▪ Day 1 (enumeration basics):
• Combinations
o Question 77
• Permutations
o Question 46
▪ Day 2 (enumeration cont.):
• Subsets
o Question 78
• Generate parentheses
o Question 22
▪ Day 3 (backtracking easy):
• Letter case permutations
o Question 784
• Combination sum
o Question 39
▪ Day 4 (backtracking hard):
• Path with maximum gold
o Question 1219
• N-queens
o Question 51
▪ Day 5 (DP easy):
• Climbing Stairs
o Question 70
• Longest Palindrome
o Question 5
▪ Day 6 (DP medium):
• Maximum square
o Question 221
• Word break
o Question 139
▪ Day 7 (Bit manipulation):
• Single number
o Question 136
o Can be done using xor operator
• Permutations
o Question 46
o Use bit manipulation to save space in recursive calls (e.g. used
or visited array)

You might also like