Roadmap
Roadmap
Day 1 (Mon):
○ Identify that one unsolved Sorting-II problem (e.g., Quick-select variation or
advanced merge sort).
○ Solve the two easy Array problems you haven’t done. Aim for ≤ 20 min each.
Day 2 (Tue):
○ C
hoose 3 medium problems (e.g., “Three Sum Variant,” “Container With Most
Water,” “Product Except Self”).
○ Pick 2 hard (e.g., “Trapping Rain Water,” “Max Subarray Circular”).
○ C
omplete remaining 0 → so skip: you already had 11/14 done, now 3 done on
Day 2 (total 14/14).
○ S
olve 3 additional hard: “Subarray with given XOR,” “Sliding-window max
subarray sum,” “Dutch National Flag.”
Day 4 (Thu):
○ T
ackle the last 4 hard Array problems: “Minimum Window Subarray,” “Merge
Intervals variant,” “Longest Consecutive Sequence,” “Rotate Array in O(1)
space.”
○ S
olve the one leftover 1D-binary search problem (e.g., “Find Peak Index in a
Mountain Array”).
Day 5 (Fri):
○ If there was any bug from yesterday, fix & test thoroughly.
1. 3
medium(e.g., “Split Array Largest Sum,” “Capacityto Ship in D
Days,” “Aggressive Cows”).
2. 3
hard(e.g., “Painters Partition,” “Book Allocation,” “Kth Smallest
Prime Fraction”).
Weekend Revision
■ 1
Sorting (medium), 1 Array (hard), 1 Binary Search (1D medium), 1
Array (medium).
1. C
atch-Up:Any leftover Step 4 Lec 2 problems (if 6yesterday, subtract
however many done).
2. P
review Next Week:Read up onBS on 2D Arrays (Step4 Lec 3)andStep
5 (Strings).
● F
inishStep 4 – Lec 2(up to 0/14) andLec 3 (BS on2D Arrays)(5
remaining).
Day 1 (Mon):
○ S
olve 3 medium 2D-BS problems: “Search a 2D Matrix I,” “Search a 2D
Matrix II,” “Find Kth Smallest Element in a Sorted Matrix.”
Day 2 (Tue):
○ T
ackle 2 hard: “Median of Two Sorted Matrices,” “Smallest Number in M
Sorted Lists (2D Binary Search variant).”
Day 3 (Wed):
○ S
olve 1 medium: “Length of Longest Substring Without Repeating
Characters.”
○ C
omplete the one leftover basic LinkedList concept (e.g., “Reverse Linked
List Recursively”).
○ ≤ 30 min.
Day 4 (Thu):
○ S
olve 5 medium: “Add Two Numbers (LL),” “Odd Even LinkedList,” “Remove
Nth Node from End,” “Copy List with Random Pointer,” “Merge Two Sorted
Lists.”
Day 5 (Fri):
○ S
olve 3 medium: “Flatten Multilevel DLL,” “LRU Cache (medium),” “DLL +
Random Pointer Copy.”
○ Solve 2 hard today: “Merge k Sorted Lists,” “Reverse Nodes in k-Group.”
Weekend Revision
1. M
ini-mock (2 hours):4 problems: 1 BS 2D (hard), 1String (medium), 1
LinkedList (hard), 1 random from Arrays.
1. C
atch-Up:Step 6 Lec 5: finish remaining 2 hard LLproblems (“LRU Cache” if
not done, and “Split LinkedList in halves”).
2. P
review Next Week:ReadRecursion (Step 7)andBit Manipulation (Step
8).
● C
ompleteStep 7 (Recursion): 11 remaining total (4hard, 0
easy/medium since Lec 2 mostly done).
Day 1 (Mon):
○ S
olve 4 easy recursion basics: “Factorial variants,” “Sum of digits,” “Fibonacci
with memo,” “Subset generation.”
○ You had 11/12; do that 1 left: “Word Break I (simple recursive).”
○ ≤ 40 min.
Day 2 (Tue):
○ S
olve final 4 hard: “Word Search,” “Generate Parentheses,” “Permutations II,”
“Letter Combinations of a Phone Number.”
○ Solve 4 easy: “Check kth bit,” “Count set bits,” “Power of two,” “Reverse bits.”
Day 4 (Thu):
○ S
olve “Swap two numbers using XOR,” “Divide without / operator,” “Isolate
rightmost set bit,” “Gray code generation.”
○ S
olve 3 medium: “Single Number I/II,” “Sum of two numbers without +,”
“Count subarrays with XOR = K.”
Day 5 (Fri):
○ Solve “Single Number III,” “Maximum XOR of two numbers in an array.”
○ S
olve 3 medium: “XOR basis for arrays,” “Bit DP subset convolution (easy
variant),” “Power set counting with bits.”
1. M
ini-mock (2 hours):4 mixed: 1 Recursion (hard),1 Bit Manip (medium), 1
LinkedList (medium), 1 Stack (easy).
■ S
olve: “Count set bits for all numbers [0…n],” “Count pairs with given
XOR.”
2. P
review Next Week:ReadStep 9 (Stack & Queues)andStep 10 (Sliding
Window & Two Pointers).
Day 1 (Mon):
○ S
olve 5 easy: “Implement Stack class,” “Implement Queue class,” “Min
Stack,” “Evaluate Reverse Polish Notation,” “Valid Parentheses (stack).”
○ S
olve 3 medium: “Infix → Postfix conversion,” “Evaluate Infix Expression,”
“Convert Postfix → Infix.”
○ S
olve 3 medium: “Next Greater Element II,” “Largest Rectangle in Histogram
(stack approach),” “Trapping Rain Water (stack).”
Day 3 (Wed):
○ S
olve 4 medium: “Sliding Window Maximum,” “Next Smaller Element,”
“Maximal Rectangle,” “Largest Rectangle in Histogram (another variant).”
○ S
olve 4 hard: “Maximal Rectangle in binary matrix,” “Minimum Remove to
Make Valid Parentheses,” “Shortest Subarray with Sum at Least K,” “Hard
pattern: “Daily Temperatures optimized variant.”
Day 4 (Thu):
○ Solve 3 medium: “Implement Deque,” “LRU Cache,” “Implement Min Queue.”
○ Solve 2 hard: “Design Hit Counter,” “All O(1) Data Structure.”
● Step 10 – Lec 1 (Sliding Window & Two Pointers – Medium): 4 remaining
○ S
olve: “Longest Substring Without Repeating Characters” (should already be
done, but re-confirm), “3-Sum,” “Container With Most Water,” “Count
Subarrays with Sum Exactly K.”
Day 5 (Fri):
● Step 10 – Lec 2 (Sliding Window & Two Pointers – Hard): 4 remaining
○ S
olve “Minimum Window Substring,” “Subarray with K Distinct Integers,”
“Count of Subarrays with Given XOR,” “Split Array Largest Sum (two-pointer
variant).”
Weekend Revision
1. M
ini-mock (2 hours):4 problems: 1 Stack (medium),1 Queue (hard), 1
Sliding Window (hard), 1 random from LinkedList.
Day 1 (Mon):
● Step 11 – Lec 1 (Learning): 4 remaining
○ S
olve 4 easy: “Implement Min-Heap,” “Implement Max-Heap,” “Find Kth
Largest Element,” “Merge K Sorted Lists.”
○ S
olve 4 medium: “Top K Frequent Elements,” “Sliding Window Median,”
“Connect Ropes with Min Cost,” “Task Scheduler (simplified).”
Day 2 (Tue):
○ R
emaining: “Find Median from Data Stream (design),” “Rearrange String K
Distance Apart,” “Super Ugly Number.”
○ S
olve 3 hard: “Merge K Sorted Lists (advanced variant),” “Design Twitter
(feed using heaps),” “Task Scheduler with cooldown (full).”
Day 3 (Wed):
○ S
olve “Find Median from Data Stream (optimized),” “Rearrange String (hard
variant),” “Super Ugly Number (hard variant).”
○ ≤ 30 min.
Day 4 (Thu):
○ S
olve 3 medium: “Partition Labels,” “Fractional Knapsack,” “Lemonade
Change.”
○ S
olve 4 hard: “Russian Doll Envelopes,” “Rearrange String K Distance Apart
(if not done),” “Candy Distribution,” “Split Array Largest Sum (if not already in
BS).”
Day 5 (Fri):
● Q
uick Review:Run through all Greedy templates (activityselection, interval
scheduling, “take local optimum” proof sketch).
Weekend Revision
1. M
ini-mock (2 hours):4 problems: 1 Heap (medium),1 Heap (hard), 1
Greedy (medium), 1 Greedy (hard).
Day 1 (Mon):
○ Solve 3 easy: “Preorder,” “Inorder,” “Postorder,” “Level Order Zigzag” variants.
○ Solve 2 medium: “Path Sum II,” “Populating Next Right Pointers.”
Day 2 (Tue):
○ S
olve 4 hard: “Binary Tree Maximum Path Sum,” “Serialize/Deserialize BT,”
“Sum of Distances in Tree,” “Tree Diameter.”
Day 3 (Wed):
○ S
olve 4 hard: “House Robber III (Tree DP),” “Recover Binary Search Tree,”
“Binary Tree Cameras,” “Binary Tree Right Side View (advanced).”
Day 4 (Thu):
○ S
olve 4 medium: “Insert into BST,” “Search in BST,” “Kth Smallest in BST,”
“Lowest Common Ancestor (BST).”
○ Solve 2 hard: “Convert Sorted Array to BST,” “Convert BST to Greater Tree.”
Day 5 (Fri):
○ S
olve final 3 hard: “Binary Tree Maximum Path Sum (if not done),” “Sum of
Distances in Tree (if not done),” “Hard variant of ‘Binary Tree Cameras’.”
Weekend Revision
1. M
ini-mock (2 hours):4 problems: 1 Binary Tree (medium),1 Binary Tree
(hard), 1 BST (medium), 1 random from Greedy.
1. Catch-Up:If any of Step 13/14 still has stragglers,finish them today.
Day 1 (Mon):
○ S
olve that last concept problem (e.g., “Number of Connected Components” if
not done).
○ ≤ 30 min.
○ Solve 2 medium: “Number of Islands” (if not done), “Flood Fill” (variant).
Day 2 (Tue):
○ ≤ 45 min.
○ S
olve 4 medium: “Word Ladder I,” “Number of Provinces,” “Cheapest Flights
Within K Stops,” “Network Delay Time (Dijkstra).”
○ ≤ 45 min each.
Day 3 (Wed):
○ S
olve 3 hard: “Word Ladder II,” “Critical Connections (Tarjan),” “Minimum
Height Trees.”
○ S
olve 4 medium: “Number of Islands II (Union-Find),” “Redundant
Connection,” “Accounts Merge,” “Min Spanning Tree (Kruskal).”
Day 4 (Thu):
○ S
olve 3 medium: “Friend Circles (Union-Find),” “Max Area of Island (DSU
variant),” “Shortest Path in Weighted Graph (using DSU).”
○ S
olve 2 hard: “Smallest String With Swaps,” “Critical Connections in a
Network (if not done).”
○ S
olve 3 medium: “Word Search II (if using trie + DFS),” “Longest Increasing
Path in a Matrix,” “Surrounded Regions (BFS/DFS).”
Day 5 (Fri):
○ You had 5/5 done, just review templates: “Knapsack,” “LIS (simple).”
Weekend Revision
1. M
ini-mock (2 hours):4 problems: 1 Graph (medium),1 Graph (hard), 1 DP
on grid (medium), 1 DFS (hard).
● Then spend the rest of the week on mixed revision + weekend mock(s).
Day 1 (Mon):
○ S
olve 4 medium: “Longest Common Subsequence,” “Longest Increasing
Subsequence (n log n),” “Word Break II (DP),” “Edit Distance.”
○ ≤ 60 min each for the last two, ≤ 45 min each for first two.
○ S
olve 3 medium: “Interleaving String,” “Regex Matching (DP approach),”
“Palindrome Partitioning (DP approach).”
Day 2 (Tue):
○ S
olve 2 medium: “Minimum Palindromic Cuts,” “Longest Palindromic
Subsequence (DP).”
○ S
olve 3 hard: “Scramble String,” “Distinct Subsequences,” “Regular
Expression Matching (advanced).”
Day 3 (Wed):
○ S
olve 4 hard: “Longest Increasing Subsequence (n log n code),” “Number of
Longest Increasing Subsequences,” “Trapping Rain Water II (3D DP),”
“Maximal Square.”
○ S
olve 3 medium: “Matrix Chain Multiplication,” “Burst Balloons,” “Palindrome
Partitioning II (DP).”
○ S
olve 4 hard: “Optimal BST,” “Split Array Largest Sum (DP variant),”
“Interleaving String (if not done),” “Egg Dropping (Super Egg Drop).”
Day 4 (Thu):
○ Solve “Maximal Square” (if not already done), “Count Squares in a 2D Matrix.”
Day 5 (Fri):
○ S
olve 4 medium/hard: “Minimum Window Substring (if not done),” “Wildcard
Matching (if not done),” “Edit Distance (if not done),” “Word Pattern II.”
○ S
olve 3 hard: “Text Justification,” “Scramble String (if not done),” “Regular
Expression Matching (if not done).”
● M
ixed Revision:Pick any 2 previously solved “hard”problems you still feel weak on
and re-solve under 60 min each.
Weekend Revision
■ 5
problems mixing any unfinished topics (if truly finished everything,
pick 5 random LeetCode “Top Interview Questions” across difficulties).
■ 1
easy → 15 min, 2 medium → (30 min each), 2 hard → (60
min each).
2. D
etailed Post-Mortem (30 min):Log the top 3 weaknesses,plan how to fix
next week.
■ P
ick 3 “hard” problems you struggled with in mock and re-solve under
45 min each.
3. At Least 8 Mock Tests Completed(4+ timed 2 hour mocks,4 mini-mocks).
5. C
onfidence in “Weak Spots”—you’ve re-solved everyhard problem that gave you
trouble.
○ 1
Problem/Day (Medium)from randomly chosen topics(rotate through all 18
steps).
○ Stick to your timed-practice habit (45 min for medium, 60 min for hard).
○ If you encounter a problem you can’t finish, clearly explain your thought
process up to that point.
○ C
ommunicate trade-offs: e.g., “I could optimize this O(n²)→O(n log n) with a
heap/BS.”
ou’ve now got alaser-focused, lecture-by-lecture planthat matches your exact current
Y
progress. Follow this day-by-day, adjust only if you finish early/encounter unexpected
difficulty, and you’ll be fully placement-ready by early August. Good luck!