Problem Roadmap & Study Plan
Patterns become interview-ready through timed repetition. Follow a roadmap of LeetCode problems grouped by pattern (with a core set if time is short), an 8-week schedule, a spaced-repetition routine and mock interviews, and track your progress right on this page.
🎯 What you'll learn
- How to work a problem with a timer
- Spaced repetition that makes solutions stick
- An 8-week plan and a 4-week core path
- A pattern-ordered roadmap with a progress tracker
📚 Before you start
Knowing the patterns is half the job; the other half is timed repetition until recognizing and coding them is automatic. This page turns the algorithms track into a plan: a roadmap of 179 LeetCode problems grouped by pattern (96 marked ★ core: do these first if time is short), an 8-week schedule, a spaced-repetition routine, and a progress tracker. 134 of the problems are solved step by step, with animations, in the lessons of this track.
1How to Work a Problem
- Set a timer: 15 minutes for Easy, 25 for Medium, 40 for Hard. Use the method from
algorithms/foundations/01-coding_interview_methodout loud, even alone. - Stuck after a third of the time? Write down what you tried, then read only the approach (not the code) and implement it yourself.
- Run the tests, then the edge cases, before submitting.
- Record one line: the pattern and the key insight ("monotonic stack: a warmer day pops colder days"). This line is what you review later.
- Mark it in the tracker below, with a note to repeat it.
2Spaced Repetition
Re-solve every problem you needed help with after 1, 3, 7 and 21 days, from a blank editor and against the timer. If you solve it cleanly twice in a row, retire it. Most people forget a solution within a week; two clean repeats are what makes the pattern stick in an interview.
| Day | Activity |
|---|---|
| Day 0 | Solve (or learn) the problem; write the one-line insight |
| Day 1 | Re-solve from scratch, timed |
| Day 3 | Re-solve; explain the solution out loud in 2 minutes |
| Day 7 | Re-solve; if clean twice in a row, retire it |
| Day 21 | Final check for anything not yet retired |
3The 8-Week Plan (about 10–15 hours per week)
| Week | Learn (lessons) | Practise (roadmap groups) | Also |
|---|---|---|---|
| 1 | Method, Big-O, Arrays & Hashing, Two Pointers | Arrays & Hashing, Two Pointers | set up a daily 30-min repetition slot |
| 2 | Sliding Window, Prefix Sums, Binary Search | Sliding Window, Prefix Sums, Binary Search | first timed mock (2 Mediums, 50 min) |
| 3 | Stacks, Queues & Deques, Linked Lists, Intervals | Stacks, Linked Lists, Intervals | review all week-1 problems |
| 4 | Recursion & Backtracking, Tree Traversals, BSTs | Trees, BSTs, Backtracking | mock interview with a friend or peer platform |
| 5 | Heaps, Tries, Graph BFS/DFS | Heaps, Tries, Graphs | redo every ★ problem from weeks 1–2 |
| 6 | Topological Sort, Union-Find, Shortest Paths | Advanced Graphs | timed mock: 1 Medium + 1 Hard |
| 7 | Greedy, DP Fundamentals, Grid & Knapsack DP | Greedy, 1-D DP, 2-D DP | DP-only review day |
| 8 | DP on Strings, Bits, Math & Matrix | Math & Matrix, Bits, mixed random ★ problems | 3 full mock interviews; rest the day before |
Short on time? Do only the ★ core problems (96), four per day on six days a week, with the same repetition schedule: about 4 weeks.
Senior candidates: coding rounds are usually Medium-level, but expectations around communication, testing and complexity are higher. Spend the time you save on system design and behavioural preparation.
4Mock Interviews
- Solve with a camera on, or with a person, at least once a week from week 2.
- Use the 45-minute budget: 5 clarify, 5 plan, 20 code, 8 test, 7 discussion.
- Afterwards, score yourself on the five rubric dimensions (problem solving, coding, communication, verification, complexity) and pick one to improve next time.
⚠️ Common Pitfalls
- Reading solutions instead of solving: recognition is not recall. Always re-solve from a blank editor.
- Grinding volume without repetition: 150 problems solved once each is worth less than 75 solved three times.
- Never timing yourself, so interview pace comes as a shock.
- Practising silently: in interviews you must think out loud.
- Skipping easy problems: they're where you build speed and clean coding habits.
📋 Quick Reference
Timer: Easy 15 · Medium 25 · Hard 40 minutes
Stuck at 1/3 time → read the approach only → implement yourself
Repeat after 1, 3, 7, 21 days; retire after two clean solves
Core path: ★ problems, 4 per day, ~4 weeks · Full path: 8 weeks179 problems in pattern order. ★ = core. Links in the last column open the lesson where the problem is solved step by step.
1Progress Tracker
Tick problems as you solve them; progress is saved in this browser.
2The Roadmap by Pattern
Arrays & Hashing
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 217 | Contains Duplicate | Easy | ★ | Arrays & Hashing |
| 242 | Valid Anagram | Easy | ★ | Arrays & Hashing |
| 1 | Two Sum | Easy | ★ | |
| 49 | Group Anagrams | Medium | ★ | Arrays & Hashing |
| 347 | Top K Frequent Elements | Medium | ★ | Arrays & Hashing |
| 238 | Product of Array Except Self | Medium | ★ | Arrays & Hashing |
| 36 | Valid Sudoku | Medium | ||
| 128 | Longest Consecutive Sequence | Medium | ★ | Arrays & Hashing |
| 271 | Encode and Decode Strings | Medium | ||
| 169 | Majority Element | Easy |
Two Pointers
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 125 | Valid Palindrome | Easy | ★ | |
| 167 | Two Sum II | Medium | ★ | Two Pointers |
| 15 | 3Sum | Medium | ★ | Two Pointers |
| 11 | Container With Most Water | Medium | ★ | Two Pointers |
| 42 | Trapping Rain Water | Hard | ★ | Two Pointers |
| 283 | Move Zeroes | Easy | Two Pointers | |
| 75 | Sort Colors | Medium | Two Pointers | |
| 977 | Squares of a Sorted Array | Easy |
Sliding Window
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 121 | Best Time to Buy and Sell Stock | Easy | ★ | Sliding Window |
| 3 | Longest Substring Without Repeating Characters | Medium | ★ | Sliding Window |
| 424 | Longest Repeating Character Replacement | Medium | ★ | Sliding Window |
| 567 | Permutation in String | Medium | Sliding Window | |
| 76 | Minimum Window Substring | Hard | ★ | Sliding Window |
| 239 | Sliding Window Maximum | Hard | Queues & Deques | |
| 209 | Minimum Size Subarray Sum | Medium | Sliding Window | |
| 1004 | Max Consecutive Ones III | Medium |
Prefix Sums
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 303 | Range Sum Query – Immutable | Easy | Prefix Sums | |
| 724 | Find Pivot Index | Easy | Prefix Sums | |
| 560 | Subarray Sum Equals K | Medium | ★ | Prefix Sums |
| 525 | Contiguous Array | Medium | Prefix Sums | |
| 974 | Subarray Sums Divisible by K | Medium | Prefix Sums | |
| 304 | Range Sum Query 2D | Medium | Prefix Sums |
Stacks & Monotonic Stack
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 20 | Valid Parentheses | Easy | ★ | Stacks & Monotonic Stack |
| 155 | Min Stack | Medium | ★ | Stacks & Monotonic Stack |
| 150 | Evaluate Reverse Polish Notation | Medium | Stacks & Monotonic Stack | |
| 739 | Daily Temperatures | Medium | ★ | Stacks & Monotonic Stack |
| 853 | Car Fleet | Medium | ||
| 84 | Largest Rectangle in Histogram | Hard | ★ | Stacks & Monotonic Stack |
| 735 | Asteroid Collision | Medium | Stacks & Monotonic Stack | |
| 496 | Next Greater Element I | Easy |
Binary Search
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 704 | Binary Search | Easy | ★ | Binary Search |
| 74 | Search a 2D Matrix | Medium | ||
| 875 | Koko Eating Bananas | Medium | ★ | Binary Search |
| 153 | Find Minimum in Rotated Sorted Array | Medium | ★ | Binary Search |
| 33 | Search in Rotated Sorted Array | Medium | ★ | Binary Search |
| 981 | Time Based Key-Value Store | Medium | ||
| 4 | Median of Two Sorted Arrays | Hard | ★ | Binary Search |
| 34 | Find First and Last Position of Element | Medium | Binary Search | |
| 278 | First Bad Version | Easy |
Linked Lists
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 206 | Reverse Linked List | Easy | ★ | Linked Lists |
| 21 | Merge Two Sorted Lists | Easy | ★ | Linked Lists |
| 143 | Reorder List | Medium | ★ | Linked Lists |
| 19 | Remove Nth Node From End of List | Medium | ★ | Linked Lists |
| 138 | Copy List with Random Pointer | Medium | ||
| 2 | Add Two Numbers | Medium | ||
| 141 | Linked List Cycle | Easy | ★ | Linked Lists |
| 287 | Find the Duplicate Number | Medium | ||
| 146 | LRU Cache | Medium | ★ | Linked Lists |
| 23 | Merge k Sorted Lists | Hard | ★ | Heaps & Top-K |
| 25 | Reverse Nodes in k-Group | Hard |
Intervals
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 56 | Merge Intervals | Medium | ★ | Intervals |
| 57 | Insert Interval | Medium | ★ | Intervals |
| 435 | Non-overlapping Intervals | Medium | ★ | Intervals |
| 252 | Meeting Rooms | Easy | Intervals | |
| 253 | Meeting Rooms II | Medium | ★ | Intervals |
| 452 | Minimum Number of Arrows to Burst Balloons | Medium | Intervals | |
| 986 | Interval List Intersections | Medium |
Trees
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 226 | Invert Binary Tree | Easy | ★ | Tree Traversals |
| 104 | Maximum Depth of Binary Tree | Easy | ★ | Tree Traversals |
| 543 | Diameter of Binary Tree | Easy | ★ | Tree Traversals |
| 110 | Balanced Binary Tree | Easy | ||
| 100 | Same Tree | Easy | ★ | |
| 572 | Subtree of Another Tree | Easy | ||
| 102 | Binary Tree Level Order Traversal | Medium | ★ | Tree Traversals |
| 199 | Binary Tree Right Side View | Medium | ||
| 1448 | Count Good Nodes in Binary Tree | Medium | ||
| 236 | Lowest Common Ancestor of a Binary Tree | Medium | ★ | Tree Traversals |
| 105 | Construct Binary Tree from Preorder and Inorder | Medium | ||
| 124 | Binary Tree Maximum Path Sum | Hard | ★ | Tree Traversals |
| 297 | Serialize and Deserialize Binary Tree | Hard | ★ |
Binary Search Trees
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 700 | Search in a BST | Easy | Binary Search Trees | |
| 98 | Validate Binary Search Tree | Medium | ★ | Binary Search Trees |
| 230 | Kth Smallest Element in a BST | Medium | ★ | Binary Search Trees |
| 235 | LCA of a BST | Medium | ★ | Binary Search Trees |
| 701 | Insert into a BST | Medium | Binary Search Trees | |
| 108 | Sorted Array to BST | Easy | Binary Search Trees |
Heaps & Top-K
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 703 | Kth Largest Element in a Stream | Easy | ||
| 1046 | Last Stone Weight | Easy | Heaps & Top-K | |
| 973 | K Closest Points to Origin | Medium | ★ | Heaps & Top-K |
| 215 | Kth Largest Element in an Array | Medium | ★ | Heaps & Top-K |
| 621 | Task Scheduler | Medium | ★ | Queues & Deques |
| 355 | Design Twitter | Medium | ||
| 295 | Find Median from Data Stream | Hard | ★ | Heaps & Top-K |
| 767 | Reorganize String | Medium | Heaps & Top-K |
Backtracking
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 78 | Subsets | Medium | ★ | Recursion & Backtracking |
| 39 | Combination Sum | Medium | ★ | Recursion & Backtracking |
| 46 | Permutations | Medium | ★ | Recursion & Backtracking |
| 90 | Subsets II | Medium | ||
| 40 | Combination Sum II | Medium | ||
| 79 | Word Search | Medium | ★ | Recursion & Backtracking |
| 131 | Palindrome Partitioning | Medium | ||
| 17 | Letter Combinations of a Phone Number | Medium | ★ | |
| 22 | Generate Parentheses | Medium | ★ | Recursion & Backtracking |
| 51 | N-Queens | Hard | Recursion & Backtracking |
Tries
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 208 | Implement Trie | Medium | ★ | Tries |
| 211 | Design Add and Search Words | Medium | ★ | Tries |
| 212 | Word Search II | Hard | ★ | Tries |
| 1268 | Search Suggestions System | Medium | Tries | |
| 648 | Replace Words | Medium | Tries |
Graphs
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 200 | Number of Islands | Medium | ★ | Graph BFS, DFS & Grids |
| 695 | Max Area of Island | Medium | ||
| 133 | Clone Graph | Medium | ★ | Graph BFS, DFS & Grids |
| 994 | Rotting Oranges | Medium | ★ | Graph BFS, DFS & Grids |
| 417 | Pacific Atlantic Water Flow | Medium | ★ | Graph BFS, DFS & Grids |
| 130 | Surrounded Regions | Medium | ||
| 207 | Course Schedule | Medium | ★ | Topological Sort |
| 210 | Course Schedule II | Medium | ★ | Topological Sort |
| 684 | Redundant Connection | Medium | Union-Find | |
| 323 | Number of Connected Components | Medium | ★ | Union-Find |
| 261 | Graph Valid Tree | Medium | ★ | Union-Find |
| 127 | Word Ladder | Hard | ★ | Graph BFS, DFS & Grids |
| 547 | Number of Provinces | Medium | Union-Find | |
| 721 | Accounts Merge | Medium | Union-Find |
Advanced Graphs
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 743 | Network Delay Time | Medium | ★ | Shortest Paths |
| 1584 | Min Cost to Connect All Points | Medium | Union-Find | |
| 787 | Cheapest Flights Within K Stops | Medium | ★ | Shortest Paths |
| 778 | Swim in Rising Water | Hard | Shortest Paths | |
| 269 | Alien Dictionary | Hard | ★ | Topological Sort |
| 1631 | Path With Minimum Effort | Medium | Shortest Paths | |
| 1091 | Shortest Path in Binary Matrix | Medium | Shortest Paths | |
| 332 | Reconstruct Itinerary | Hard |
1-D Dynamic Programming
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 70 | Climbing Stairs | Easy | ★ | Dynamic Programming Fundamentals |
| 746 | Min Cost Climbing Stairs | Easy | ||
| 198 | House Robber | Medium | ★ | Dynamic Programming Fundamentals |
| 213 | House Robber II | Medium | ★ | |
| 5 | Longest Palindromic Substring | Medium | ★ | DP on Strings |
| 647 | Palindromic Substrings | Medium | ★ | DP on Strings |
| 91 | Decode Ways | Medium | ★ | Dynamic Programming Fundamentals |
| 322 | Coin Change | Medium | ★ | Dynamic Programming Fundamentals |
| 152 | Maximum Product Subarray | Medium | ★ | |
| 139 | Word Break | Medium | ★ | Dynamic Programming Fundamentals |
| 300 | Longest Increasing Subsequence | Medium | ★ | Dynamic Programming Fundamentals |
| 416 | Partition Equal Subset Sum | Medium | DP on Grids & Knapsack |
2-D Dynamic Programming
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 62 | Unique Paths | Medium | ★ | DP on Grids & Knapsack |
| 64 | Minimum Path Sum | Medium | DP on Grids & Knapsack | |
| 1143 | Longest Common Subsequence | Medium | ★ | DP on Strings |
| 518 | Coin Change II | Medium | DP on Grids & Knapsack | |
| 494 | Target Sum | Medium | DP on Grids & Knapsack | |
| 97 | Interleaving String | Medium | DP on Strings | |
| 72 | Edit Distance | Medium | ★ | DP on Strings |
| 221 | Maximal Square | Medium | DP on Grids & Knapsack | |
| 309 | Best Time to Buy and Sell Stock with Cooldown | Medium | ||
| 329 | Longest Increasing Path in a Matrix | Hard | ||
| 115 | Distinct Subsequences | Hard | ||
| 312 | Burst Balloons | Hard | ||
| 10 | Regular Expression Matching | Hard | DP on Strings |
Greedy
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 53 | Maximum Subarray | Medium | ★ | Greedy |
| 55 | Jump Game | Medium | ★ | Greedy |
| 45 | Jump Game II | Medium | Greedy | |
| 134 | Gas Station | Medium | Greedy | |
| 846 | Hand of Straights | Medium | Greedy | |
| 763 | Partition Labels | Medium | ★ | Greedy |
| 678 | Valid Parenthesis String | Medium | ||
| 122 | Best Time to Buy and Sell Stock II | Medium |
Math & Matrix
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 48 | Rotate Image | Medium | ★ | Math & Matrix |
| 54 | Spiral Matrix | Medium | ★ | Math & Matrix |
| 73 | Set Matrix Zeroes | Medium | ★ | Math & Matrix |
| 202 | Happy Number | Easy | Math & Matrix | |
| 66 | Plus One | Easy | ||
| 50 | Pow(x, n) | Medium | Math & Matrix | |
| 43 | Multiply Strings | Medium | ||
| 204 | Count Primes | Medium | Math & Matrix |
Bit Manipulation
| # | Problem | Difficulty | Core | Worked walkthrough |
|---|---|---|---|---|
| 136 | Single Number | Easy | ★ | Bit Manipulation |
| 191 | Number of 1 Bits | Easy | ★ | Bit Manipulation |
| 338 | Counting Bits | Easy | ★ | Bit Manipulation |
| 190 | Reverse Bits | Easy | Bit Manipulation | |
| 268 | Missing Number | Easy | ★ | Bit Manipulation |
| 371 | Sum of Two Integers | Medium | Bit Manipulation | |
| 7 | Reverse Integer | Medium |
🧠 Key takeaways
- Practise with a timer and out loud; read only the approach when stuck.
- Spaced repetition (1, 3, 7, 21 days) beats raw problem count.
- Follow the 8-week plan, or the ★ core path in about 4 weeks.
- Run a weekly mock interview and score yourself on the five rubric dimensions.
✅ Check yourself
Answer the questions — feedback is instant.