A LeetCode Study Plan That Works: 8 Weeks, Pattern by Pattern
An eight-week LeetCode study plan for coding interviews: which topics to study in which order, how many problems to do, how to review them so they stick, and how to know you're ready.
LiveHint.ai team · · 4 min read
The most common way to prepare for coding interviews is also the least effective: open LeetCode, sort by acceptance rate, and solve problems at random until the interview arrives. You end up with a few hundred solved problems and no reliable way to approach the next one.
What works better is studying by pattern. Most interview problems are variations on a few dozen techniques. Learn to recognize the technique and the specific problem matters much less.
This plan takes eight weeks at roughly an hour a day. Compress it if your interview is sooner; stretch it if you're working full time and tired.
Before you start
- Pick one language and stick to it. Python is the most concise for interviews, but use whatever you're fastest in. Know its standard library for lists, maps, sets, heaps and sorting cold.
- Review complexity. You'll need to state time and space for every solution. Our Big O cheat sheet covers it.
- Read the patterns overview. Our guide to coding interview patterns explains each technique this plan uses.
The plan
| Week | Topics | Target |
|---|---|---|
| 1 | Arrays, hashing, two pointers | 12–15 easy and medium problems |
| 2 | Sliding window, prefix sums, stacks | 12–15 problems |
| 3 | Binary search, linked lists | 12 problems |
| 4 | Trees: traversal, BST, recursion | 15 problems |
| 5 | Graphs: BFS, DFS, topological sort, union-find | 12–15 problems |
| 6 | Heaps, intervals, greedy | 12 problems |
| 7 | Backtracking and dynamic programming | 15 problems |
| 8 | Mixed review and timed mock interviews | 10–12 problems plus 3–4 mocks |
That's around 100 to 120 problems. It's enough. Beyond that, the returns drop quickly unless you're targeting companies known for very hard problems.
How to work each problem
How you practice matters more than how many problems you solve.
- Read and restate. Write down the inputs, outputs and constraints. Note the size of
n; it hints at the expected complexity. - Try for 20 to 30 minutes. Talk through approaches out loud as if an interviewer were listening.
- If you're stuck, read a hint, not the solution. Then try again for 10 minutes.
- If you still can't solve it, study the solution carefully. Understand why the technique applies, then close it and write the code yourself from scratch.
- State the complexity and test with an edge case or two: empty input, one element, duplicates, negatives.
- Write a one-line note: the pattern and the key insight. For example, "sliding window; shrink when the window has more than k distinct characters."
The note in step 6 is the part most people skip, and it's the one that makes review possible.
Review: the part that makes it stick
Solving a problem once doesn't mean you can solve it in three weeks. Build in review:
- Two or three days later, re-solve any problem you needed help with. Don't look at your old code.
- At the end of each week, read through your notes and re-solve the two hardest problems.
- In week 8, pick 10 problems from your notes at random and solve them under a time limit.
If you can solve a problem cleanly from scratch a week after first seeing it, you've learned the pattern. If you can't, it goes back on the list.
Easy, medium and hard
- Weeks 1–2: mostly easy, then a few mediums once the pattern clicks.
- Weeks 3–7: mostly medium. Most interview questions are medium difficulty.
- Hard problems: a few, late in the plan, only for the topics you're comfortable with. Don't spend an hour stuck on hards in week two.
Practice the interview, not just the problem
An interview isn't a LeetCode submission. You're scored on how you communicate as much as on whether the code passes. From week 4 onwards, practice the full routine at least twice a week:
- Ask clarifying questions before coding.
- State a brute-force approach, then improve it.
- Explain the approach before you write code.
- Narrate while you write.
- Walk through a test case by hand at the end.
Doing this alone feels strange, which is why most people skip it. Doing it with another person, or in an AI mock interview set to a coding round, is the closest thing to the real experience. Our technical phone screen guide covers the communication side in detail.
How to tell you're ready
You're in good shape when:
- You can name the likely pattern within a few minutes of reading most medium problems.
- You solve most mediums in 25 to 35 minutes, including explaining them.
- You can state the complexity of your solution without hesitating.
- You've done at least three timed mock interviews and the last one felt manageable.
You don't need to solve everything. Interviewers routinely pass candidates who needed a hint but communicated well and recovered.
If you only have two weeks
Cut the plan to the highest-value topics: arrays and hashing, two pointers, sliding window, trees, BFS and DFS, and one or two dynamic programming classics. Do about 40 problems, review the ones you missed, and spend the last three days on mock interviews. If nerves are part of the problem, read our guide to interview anxiety during live coding.
Keep reading
5 min read
12 Coding Interview Patterns That Cover Most Questions
Learn the 12 problem-solving patterns behind most coding interview questions, from two pointers to dynamic programming, with how to spot each one and a template to start from.
- coding interview
- data structures and algorithms
- LeetCode
- software engineering
4 min read
Software Engineer Interview Prep: A Step-by-Step Plan
A complete software engineer interview preparation plan: understanding the loop, building a timeline, coding practice, system design, behavioral stories, resume deep dives and mock interviews, with a week-by-week schedule.
- software engineering
- interview preparation
- coding interview
- system design