Home · Blog · Technical and coding

LeetCode study plan for interviews (8 weeks)

Solving problems at random is the slowest way to prepare. A plan that goes pattern by pattern, with regular review, gets you ready faster and makes new problems feel familiar. Here's an eight-week plan you can shorten or stretch.

Ghostpilot team · · 4 min read

A dark blue card with the title "LeetCode study plan for interviews" next to the Ghostpilot ghost

In short

Practise this free: a mock interview for Coding round (algorithms), scored, with a stronger answer. 3 a month, no card.

Start a mock interview

There are thousands of problems on LeetCode, and it’s easy to lose weeks solving whatever looks interesting. Interviews don’t reward volume. They reward recognising a pattern quickly and applying it cleanly while explaining yourself. A study plan that goes through the patterns in order gets you there faster.

How the plan works

If you have four weeks instead of eight, do two weeks’ topics each week and drop the hard problems. If you have three months, slow down and add a mock interview every week.

The 8-week plan

Week 1: arrays, strings and hash maps. Counting, finding duplicates, two-sum style lookups. Get comfortable with complexity; our guide to big O notation covers what you need.

Week 2: two pointers and sliding window. Pairs in sorted arrays, longest substring problems, merging. These appear constantly.

Week 3: stacks, queues and binary search. Valid parentheses, next greater element, searching sorted and rotated arrays, binary search on the answer.

Week 4: linked lists and trees. Reversal, fast and slow pointers, tree traversals, depth, lowest common ancestor, binary search trees.

Week 5: graphs. BFS and DFS on grids and graphs, connected components, topological sort, shortest paths in unweighted graphs.

Week 6: heaps, intervals and greedy. Top-k problems, merging intervals, meeting rooms, scheduling. Start timing every problem at 35 minutes.

Week 7: backtracking and dynamic programming. Subsets and permutations, then classic DP: climbing stairs, coin change, longest common subsequence. Start with recursion and memoisation; tables come later.

Week 8: mixed review and mock interviews. Random problems from all weeks, two or three mock interviews, and your mistakes list. Stop new topics two days before.

For a refresher on what each structure does, see our guide to data structures to know for interviews. Curated lists such as the NeetCode roadmap follow a similar order if you want a ready-made problem list for each week.

A daily session

One hour on a weekday:

How to review so it sticks

If you fall behind

Almost everyone does. Don’t try to catch up by doubling the daily load; that usually ends the plan. Instead, drop the hardest problems from the current week, keep the review sessions, and move on to the next pattern on schedule. Breadth across patterns matters more in interviews than depth in one, so it’s better to have seen every pattern a few times than to master half of them.

From practice to interview

Solving problems alone isn’t the same as solving them in front of someone. From week 6:

The whole routine is in our guide on how to pass a coding interview.

Adjusting the plan to your target

Not every company tests the same things, so tilt the plan towards what you’ll face:

Ask the recruiter what the coding round looks like. Most will tell you the format, the length and sometimes the kind of problems, and it saves you weeks of preparing for the wrong thing.

Common mistakes

Check the role you’re applying for too: our lists of software engineer and Python developer interview questions show what comes up beyond algorithms.

Turn practice into interview performance, free. Ghostpilot’s mock interviews ask technical questions for your role and score how clearly you explain your approach.

3 mock interviews a month are free, with no card needed.

Start free

Questions

How many LeetCode problems do I need for interviews?

Most people are well prepared after 100 to 150 problems chosen to cover the main patterns, as long as they review them. Quality of practice matters more than the count.

Should I do easy, medium or hard problems?

Start a new pattern with one or two easy problems, then spend most of your time on mediums, which match most interview questions. Add a few hards in the last weeks if you're aiming at companies known for them.

How long should I spend on a problem before looking at the answer?

About 20 to 30 minutes for a medium. If you're still stuck, read the solution, close it, and write it yourself. Come back to the problem a few days later.

Is LeetCode enough to pass coding interviews?

It covers problem solving, but interviews also score communication and testing. Add practice out loud and some mock interviews, plus behavioral and, for senior roles, system design preparation.

Get live help in your next interview

Ghostpilot hears each question and shows an answer from your CV, in a small window above your call. Free to start: 2 live interviews and 3 mock interviews a month, no card needed.

Keep reading

How to pass a coding interview (a step-by-step plan)Technical and coding · 4 min read
Big O notation for interviews, explained simplyTechnical and coding · 4 min read
Data structures to know for coding interviewsTechnical and coding · 4 min read
Technical interviews for non-technical rolesTechnical and coding · 4 min read