a plan, not a list
DSA K120
120 LeetCode problems, one coding skill at a time, with a revision week at the end. Each skill builds on the one before it, and every problem lists the common mistake that trips people up.
- Week 1: Hash maps and running variables10 problems · 10 hours · 0 of 10 done
- Week 2: Two pointers and sliding window10 problems · 10 hours · 0 of 10 done
- Week 3: Binary search and bit tricks10 problems · 10 hours · 0 of 10 done
- Week 4: Linked lists9 problems · 9 hours · 0 of 9 done
- Week 5: Stacks and queues8 problems · 8 hours · 0 of 8 done
- Week 6: Recursion and tree DFS10 problems · 10 hours · 0 of 10 done
- Week 7: Tree BFS, construction and tries8 problems · 8 hours · 0 of 8 done
- Week 8: Backtracking9 problems · 9 hours · 0 of 9 done
- Week 9: Intervals and greedy9 problems · 9 hours · 0 of 9 done
- Week 10: Heaps and the two medians7 problems · 7 hours · 0 of 7 done
- Week 11: Graphs I: traversal7 problems · 7 hours · 0 of 7 done
- Week 12: Graphs II: union-find and shortest paths7 problems · 7 hours · 0 of 7 done
- Week 13: Dynamic programming I: one dimension8 problems · 8 hours · 0 of 8 done
- Week 14: Dynamic programming II: tables and knapsack8 problems · 8 hours · 0 of 8 done
- Week 15: Revision and mock interviewsrevision · 8 hours
How to use the plan
- Work the weeks in order. Several weeks reuse the template from the week before, so do not skip around.
- Before each week, practise its coding mechanics and type its template from memory until it feels automatic.
- Do the problems top to bottom. If a Hard at the end of a week is too much, skip it and come back in the revision week.
- Tick a problem only when you could redo it from a blank screen. Leave the rest for revision.
- A study week is about 7 to 10 hours of work, not a calendar week. Spread it over as many calendar weeks as you need.
- Core marks a problem that also appears in three or more of Blind 75, NeetCode 150, Striver’s 75 and Striver’s 180. Premium needs a LeetCode subscription.
Are you stuck?
I know the idea but cannot start
Write the function signature and the return statement, then the loop skeleton. Work backwards from the output.My code runs but gives wrong answers
Trace the failing input line by line and print the state variables each step. Check the common trap in that problem's row.Off-by-one errors
Write the loop invariant in a comment ("window is s[l..r] inclusive") and test inputs of size 1 and 2.Recursion confuses me
Write one sentence: "dfs(node) returns ...". Solve the base case and a 3-node tree by hand before coding.I cannot track pointers
Draw boxes and arrows. Redraw after every line of pointer code.I read the solution and understood it but cannot reproduce it
Close it. Write only the comment plan from memory, then the code. Repeat tomorrow.
Where DSA K120 comes from
DSA K120 is picked from these lists. A problem tagged core is on at least three of them. Problem text stays on LeetCode, and each row links to it.
NeetCode 150, Blind 75, Striver’s 75, Striver’s 180