Career Guide · DSA Study Plan

30-Day Coding Interview Preparation Plan: The Day-by-Day Schedule

You have an interview in a month. Here is exactly what to solve each day, how to re-solve so it sticks, when to run mocks, and what to do in the last 72 hours.

✍️ Pranjal Jain, Ex-Microsoft · IIT Kanpur 📅 10 October 2026 ⏱ 20 min read
A thirty-day calendar gradually filled with data structure icons next to a laptop, representing a one-month coding interview plan
TL;DR
  • The plan assumes about 2–3 hours on weekdays and 5–6 hours on weekends (roughly 110 hours) and that you can already code in one language.
  • Weeks 1–3 cover 15 patterns with about 4 new problems a day plus 1–2 re-solves. That adds up to around 120 problems you can actually rebuild from memory.
  • Week 4 is for mocks, weak spots and revision. You do not learn new topics in the last 5 days.
  • Every problem goes into an error log and gets re-solved on day +1, +3 and +7. This is what makes the month stick.
  • Mocks start on Day 10, not Day 28. Thinking out loud under a timer is its own skill and needs practice.

You got the call: the interview is in four weeks. Most people react by opening a 450-problem sheet, getting through problem 60, and walking into the interview with half the topics untouched. This plan works the other way round. It starts from the date and the hours you really have, picks the problems that teach the most reusable patterns, and builds in re-solves and mock interviews so that what you practise in week one is still there on interview day.

Below is the full day-by-day schedule with specific LeetCode problems, the routine for each day, the code templates worth memorising, and how to compress or stretch the plan for your situation. It is built for Indian product-company and FAANG-style loops (Amazon, Google, Microsoft, Flipkart, Atlassian, Uber, Razorpay and similar). Service-company OAs and many startups ask the same patterns, just easier.

Before Day 1: Assumptions and a 90-Minute Diagnostic

A one-month plan only works if its starting assumptions match you. This one assumes:

  • You are comfortable in one language: loops, functions, classes, and its standard collections (a hash map, a dynamic array, a heap/priority queue, a deque). If you are not sure which language to use, read Java vs Python vs C++ for DSA and pick in one evening. Don't spend a week deciding.
  • You have seen arrays, linked lists, trees and recursion before, even if they are rusty.
  • You have about 110 hours in total. That is 2.5 hours × 20 weekdays + 6 hours × 10 weekend days, give or take.

Spend 90 minutes on a diagnostic the day before you start. Pick one medium from each of these areas and give yourself 25 minutes per problem: hashing (LeetCode 49 Group Anagrams), sliding window (3 Longest Substring Without Repeating Characters), trees (102 Binary Tree Level Order Traversal) and DP (198 House Robber). Note which ones you solved cleanly, which you half-solved and which you could not start. The topics you could not start get extra re-solve slots in the schedule. The ones you solved cleanly let you skip the warm-up easies for that week.

⚠️
If you could not start any of the fourA month is still useful, but aim for a later interview date if you can. Ask the recruiter for 6–8 weeks; that request is routinely granted. Then follow this plan at about 60% speed.

How the 30 Days Are Built

The plan has three design rules, and each one is there to fix a common way people waste a prep month.

  1. Patterns before volume. Interview questions are mostly variations on about 15 patterns. Each day teaches one pattern with one "learn it" problem and then three problems that use it in different ways. The problem list is a curated subset of the well-known lists compared in Blind 75 vs NeetCode 150 vs Striver SDE Sheet, ordered so that each topic builds on the previous one (trees before graphs, recursion before DP).
  2. Spaced re-solving. A problem you solved once and never saw again is mostly gone after a week. Each day starts with re-solving problems from 1, 3 and 7 days earlier, from a blank editor, without looking at your old code.
  3. Mocks early and often. Solving quietly at your desk and explaining a solution to a stranger in 45 minutes are different skills. You get your first mock on Day 10 and about eight in total.
~120
New problems over 30 days
15
Core patterns covered
8
Mock interviews
3×
Re-solves per hard-won problem

The Daily Routine (Weekday and Weekend Versions)

The routine matters more than the problem list. Here is the weekday block, built for someone who works full time. If you are a student, run the weekend version every day.

BlockWeekday (2.5 h)Weekend (6 h)What you actually do
Re-solve25 min45 minRe-solve 1–2 problems from your error log that are due (day +1, +3, +7). Blank editor, timer on.
Learn20 min40 minStudy the day's pattern: read one clean explanation, write the template from memory.
Solve90 min3 h3–4 problems (weekday) or 6–8 (weekend). 25-minute timebox per medium before you look at hints.
Log15 min30 minWrite the error log entries: the key insight in one line, what you missed, the complexity.
Mock / design—1 hMock interview, system design basics, or behavioural story prep, depending on the week.

The 25-minute rule for being stuck

Set a timer for each medium. In the first 10 minutes, write down the brute force and its complexity, even if it is obviously too slow. If you have no direction by minute 25, read only the first hint or the topic tag and try for 10 more minutes. If you are still stuck, read the full solution, close it, and write the code yourself from a blank file. Then mark the problem for re-solving. Spending two hours stuck on one problem feels productive, but in a 30-day window it is one of the most expensive mistakes you can make.

The error log: the one artefact that matters

Keep one spreadsheet with these columns: Date | Problem | Pattern | Solved? (Y / hint / no) | Key insight in one line | Mistake | Re-solve dates. "Key insight" is something like "monotonic decreasing deque of indices; pop from front when out of window". If you cannot write that line, you did not really understand the problem. In week 4 this log is your revision material, and it is far more valuable than re-reading editorials.

Week 1 (Days 1–7): Arrays, Hashing, Two Pointers, Sliding Window, Binary Search, Stacks

Week one covers the patterns behind most phone screens and online assessments. Problems marked ★ are core; if you are short on time, do only those.

DayPatternProblems (LeetCode #)Count
1Arrays & hashing★1 Two Sum, ★49 Group Anagrams, ★347 Top K Frequent Elements, ★238 Product of Array Except Self, 128 Longest Consecutive Sequence5
2Prefix sums★303 Range Sum Query – Immutable, ★560 Subarray Sum Equals K, 525 Contiguous Array, 974 Subarray Sums Divisible by K4
3Two pointers125 Valid Palindrome, ★167 Two Sum II, ★15 3Sum, ★11 Container With Most Water, 75 Sort Colors5
4Sliding window★121 Best Time to Buy and Sell Stock, ★3 Longest Substring Without Repeating Characters, ★424 Longest Repeating Character Replacement, 567 Permutation in String, 209 Minimum Size Subarray Sum5
5Binary search (incl. on answer)704 Binary Search, ★33 Search in Rotated Sorted Array, ★153 Find Minimum in Rotated Sorted Array, ★875 Koko Eating Bananas, 1011 Capacity To Ship Packages Within D Days5
6 (wknd)Stacks & monotonic stack★20 Valid Parentheses, ★155 Min Stack, 150 Evaluate Reverse Polish Notation, ★739 Daily Temperatures, 853 Car Fleet, ★84 Largest Rectangle in Histogram, 42 Trapping Rain Water7
7 (wknd)Review + hard window★76 Minimum Window Substring, 239 Sliding Window Maximum, 34 First and Last Position; re-solve every week-1 problem marked "hint" or "no"3 + re-solves

What you should be able to do by Day 7: on seeing "subarray/substring with a constraint", decide between sliding window (all values non-negative, or the window condition is monotonic) and prefix sum + hash map (negative numbers are possible, or you need an exact sum). That one decision alone covers a large share of array questions. If it still feels shaky, read the sliding window guide on Day 7.

Use the Day 7 weekend hour for your introduction and project story. Write a 90-second "tell me about yourself" and practise it out loud once. It sounds unrelated to DSA, but every round opens with it, and getting it ready early frees up week 4.

Week 2 (Days 8–14): Linked Lists, Trees, Heaps, Backtracking

Week two is about recursion and pointers. The key skill is trusting the recursion: you define what a function returns for a subtree and stop trying to trace the whole call stack in your head.

DayPatternProblems (LeetCode #)Count
8Linked lists★206 Reverse Linked List, ★21 Merge Two Sorted Lists, ★141 Linked List Cycle, ★19 Remove Nth Node From End, 143 Reorder List5
9Linked list design★146 LRU Cache, 138 Copy List with Random Pointer, 2 Add Two Numbers, ★23 Merge k Sorted Lists4
10Tree DFS★226 Invert Binary Tree, ★104 Maximum Depth, ★543 Diameter of Binary Tree, 110 Balanced Binary Tree, 572 Subtree of Another Tree. Mock #1 (30 min, one medium)5
11Tree BFS & BST★102 Level Order Traversal, 199 Right Side View, ★98 Validate BST, ★230 Kth Smallest in BST, 235 LCA of a BST5
12Harder trees★236 LCA of a Binary Tree, ★105 Construct Tree from Preorder and Inorder, 124 Binary Tree Maximum Path Sum, 297 Serialize and Deserialize4
13 (wknd)Heaps / top-K703 Kth Largest in a Stream, ★215 Kth Largest Element, ★973 K Closest Points to Origin, ★621 Task Scheduler, ★295 Find Median from Data Stream, 355 Design Twitter6
14 (wknd)Backtracking★78 Subsets, ★46 Permutations, ★39 Combination Sum, 90 Subsets II, 40 Combination Sum II, ★79 Word Search, 131 Palindrome Partitioning7

Mock #1 on Day 10 should be gentle. Ask a friend, a colleague, or use a peer platform, and solve one medium out loud in 30 minutes. The point is not to pass. It is to find out what goes wrong when someone is watching: going silent, jumping to code, forgetting edge cases. Write down three things to fix. The think-out-loud guide is worth reading the night before.

On Day 14 you should be able to state, for any tree problem, what the recursive function returns and what it updates globally. Diameter (543) and Max Path Sum (124) are the same shape: return the best single downward path, and update a global answer with the path that bends through the node. If you can see that link, trees are done.

Week 3 (Days 15–21): Graphs, Tries, Intervals, Greedy, Dynamic Programming

Week three is the heaviest. Graphs and DP are what separate a pass from a strong pass at product companies, and they are also what most people leave until it is too late. If week 2 ran over, cut Day 18's optional problems, not the DP days.

DayPatternProblems (LeetCode #)Count
15Graph traversal on grids★200 Number of Islands, ★695 Max Area of Island, ★994 Rotting Oranges, 417 Pacific Atlantic Water Flow, 130 Surrounded Regions5
16Graphs: adjacency lists, topo sort★133 Clone Graph, ★207 Course Schedule, ★210 Course Schedule II, 547 Number of Provinces4
17Union-find, shortest paths★684 Redundant Connection, ★743 Network Delay Time (Dijkstra), 787 Cheapest Flights Within K Stops, 127 Word Ladder. Mock #24
18Intervals, greedy, tries★56 Merge Intervals, ★57 Insert Interval, ★435 Non-overlapping Intervals, ★55 Jump Game, 763 Partition Labels, ★208 Implement Trie6
191-D DP70 Climbing Stairs, ★198 House Robber, 213 House Robber II, ★322 Coin Change, ★139 Word Break, 91 Decode Ways6
20 (wknd)DP: subsequences & subsets★300 Longest Increasing Subsequence, ★416 Partition Equal Subset Sum, ★152 Maximum Product Subarray, 5 Longest Palindromic Substring, 518 Coin Change II, 494 Target Sum6
21 (wknd)2-D DP★62 Unique Paths, ★1143 Longest Common Subsequence, ★72 Edit Distance, 64 Minimum Path Sum, 309 Stock with Cooldown. Mock #35

For DP, use one procedure every time: (1) define the state in words ("dp[i] = fewest coins to make amount i"), (2) write the transition, (3) write the base cases, (4) code it top-down with memoisation, (5) only then convert to bottom-up if the interviewer asks. Interviewers care much more that you can say the state out loud than that you can produce an optimised 1-D table straight away. The DP interview questions guide goes deeper into the families.

Weekend hours in week 3 are for system design fundamentals if you have 2+ years of experience (load balancing, caching, database choice, one classic design such as a URL shortener or rate limiter). Freshers should use them for OS/DBMS/CN basics or for an extra DP session.

Week 4 (Days 22–30): Mocks, Weak Spots, Company Prep and Revision

No new topics after Day 25. Week four turns what you know into performance under interview conditions.

DayFocusWhat to do
22Weakest pattern #1Sort your error log by "no" and "hint". Pick the worst pattern; solve 4 fresh mediums in it (use the topic tag on LeetCode).
23Weakest pattern #2 + mixed set3 fresh problems in the second-worst pattern, then 2 random mediums without seeing the tag. Spotting the pattern yourself is the skill being tested.
24Company-tagged problemsSolve 4–5 recent problems tagged for your target company (LeetCode company tags, GfG, or interview experiences on LeetCode Discuss). Mock #4.
25Hard exposureTwo classic hards you have not done: 4 Median of Two Sorted Arrays and 212 Word Search II. Timebox to 40 min each; it is fine to read the solution.
26 (wknd)Full loop simulationBack-to-back: 45-min coding mock, 15-min break, 45-min coding mock, then a 30-min design or behavioural mock (Mocks #5–6). Debrief in writing.
27 (wknd)Re-solve marathonRe-solve 12–15 problems from the log, one per pattern, at interview speed (20 min each). Fix whatever the Day 26 debrief flagged.
28Behavioural + projectsFinalise 5–6 STAR stories and the deep-dive explanation of your main project. Mock #7 (mixed).
29Light revisionRead the pattern cheat sheet and "key insight" column. Re-solve 3 favourites. Mock #8 (short, confidence-building).
30Interview eve / dayNo new problems. Check setup, sleep, reread your intro. See the checklist below.

How to get eight mocks without paying for eight

Mix three sources. Peers: pair with a friend on the same timeline and swap roles; being the interviewer teaches you what a good candidate sounds like. Peer-matching platforms: free mock platforms pair strangers, which is useful because you lose the comfort of a friend. One or two paid or senior mocks: an engineer who has actually interviewed at your target company gives calibrated feedback a peer cannot. For structure and how to debrief, see the mock interview strategy guide.

The last 24 hours checklist

  • Re-solve three problems you know well. The point is warm hands, not new learning.
  • Re-read your error log "key insight" column top to bottom (about 20 minutes).
  • Remote interview: test camera, mic, internet, the coding pad (CoderPad, HackerRank, Google Docs or whatever the invite says), and keep a phone hotspot as backup.
  • Prepare two questions to ask the interviewer (see 30 smart questions to ask).
  • Stop by 9 pm. A tired brain loses more points than one more problem could add.

Code Templates Worth Memorising in Week 1–3

Templates are not for copy-pasting into interviews. They are there so your hands already know the boilerplate and your attention can go to the problem-specific part. These are the three with the highest payoff. Write each one from memory on the day you learn it and again on Day 27.

1. Variable-size sliding window (Day 4)

Example: length of the longest substring without repeating characters (LeetCode 3). The window [left, right] grows on the right; while it is invalid, shrink it from the left.

Python
def length_of_longest_substring(s: str) -> int:
    last_seen = {}          # char -> most recent index
    left = best = 0
    for right, ch in enumerate(s):
        if ch in last_seen and last_seen[ch] >= left:
            left = last_seen[ch] + 1   # jump past the duplicate
        last_seen[ch] = right
        best = max(best, right - left + 1)
    return best
C++
#include <string>
#include <unordered_map>
#include <algorithm>
using namespace std;

int lengthOfLongestSubstring(const string& s) {
    unordered_map<char, int> lastSeen;
    int left = 0, best = 0;
    for (int right = 0; right < (int)s.size(); ++right) {
        auto it = lastSeen.find(s[right]);
        if (it != lastSeen.end() && it->second >= left)
            left = it->second + 1;
        lastSeen[s[right]] = right;
        best = max(best, right - left + 1);
    }
    return best;
}

Dry run on "abba": right=0 'a' → window "a", best 1. right=1 'b' → "ab", best 2. right=2 'b' was seen at 1 ≥ left 0, so left=2 → "b". right=3 'a' was seen at 0, but 0 < left 2, so left stays 2 → "ba", best stays 2. Without the >= left check, left would jump backwards to 1 and you would get 3. That is the classic bug, and it is exactly what this dry run catches.

2. Binary search on the answer (Day 5)

When the question says "minimum X such that a condition holds" and the condition is monotonic (true for everything above some threshold), binary search over X. Koko Eating Bananas (875):

Python
def min_eating_speed(piles: list[int], h: int) -> int:
    def hours(k: int) -> int:
        return sum((p + k - 1) // k for p in piles)   # ceil(p / k)

    lo, hi = 1, max(piles)
    while lo < hi:                 # find first k with hours(k) <= h
        mid = (lo + hi) // 2
        if hours(mid) <= h:
            hi = mid               # mid works; maybe smaller works too
        else:
            lo = mid + 1
    return lo
C++
#include <vector>
#include <algorithm>
using namespace std;

int minEatingSpeed(const vector<int>& piles, int h) {
    auto hours = [&](long long k) {
        long long total = 0;
        for (int p : piles) total += (p + k - 1) / k;
        return total;
    };
    int lo = 1, hi = *max_element(piles.begin(), piles.end());
    while (lo < hi) {
        int mid = lo + (hi - lo) / 2;
        if (hours(mid) <= h) hi = mid;
        else lo = mid + 1;
    }
    return lo;
}

Complexity: O(n log M) where M is the largest pile. Note the long long in C++: the hour total can overflow int when piles are up to 109. Saying that out loud is the kind of detail that earns a "strong" on coding quality.

3. BFS on a grid (Day 15)

Multi-source BFS from Rotting Oranges (994) also covers shortest path in an unweighted grid, "walls and gates", and nearest-zero distance.

Python
from collections import deque

def oranges_rotting(grid: list[list[int]]) -> int:
    rows, cols = len(grid), len(grid[0])
    q, fresh = deque(), 0
    for r in range(rows):
        for c in range(cols):
            if grid[r][c] == 2:
                q.append((r, c))
            elif grid[r][c] == 1:
                fresh += 1
    minutes = 0
    while q and fresh:
        for _ in range(len(q)):            # one BFS level = one minute
            r, c = q.popleft()
            for dr, dc in ((1, 0), (-1, 0), (0, 1), (0, -1)):
                nr, nc = r + dr, c + dc
                if 0 <= nr < rows and 0 <= nc < cols and grid[nr][nc] == 1:
                    grid[nr][nc] = 2       # mark when enqueuing, not when popping
                    fresh -= 1
                    q.append((nr, nc))
        minutes += 1
    return minutes if fresh == 0 else -1

Mark a cell visited when you enqueue it, not when you pop it. Otherwise the same cell is added several times, and on large grids that blows up both time and memory. A full walkthrough is in LeetCode 994 explained.

Adjusting the Plan for Your Situation

If you only have 14 days

Do only the ★ problems and merge days in pairs: Days 1+2, 3+4, 5+6, 8+9, 10+11, 13+14, 15+16, 19+20. Keep at least three mocks. Drop Days 12, 17 and 25. Drop the 2-D DP day only if your target company is known for lighter DSA (many mid-size startups and service-company lateral roles).

If you only have one hour a day

Stretch to six weeks: 2 new problems + 1 re-solve per weekday, and the full weekend blocks. Don't cut re-solves to make room for more new problems. That trade feels faster and is slower.

Target-specific tweaks

TargetChange to the plan
AmazonAdd 30 min of Leadership Principle stories every weekend from week 1; Amazon weights behavioural heavily in every round. Online assessment is usually 2 coding questions plus work-style sections; see the Amazon OA guide.
GoogleSpend more time on graphs and DP (week 3 gets 2 extra days, taken from Day 22–23), and practise coding in a plain doc without autocomplete.
Flipkart, Swiggy, Razorpay, PhonePe (2+ YOE)Expect a machine coding / LLD round. Replace Day 25 and one weekend hour with a 90-minute machine-coding practice (parking lot, Splitwise-style).
Service companies / mass hiringWeeks 1–2 matter most; add aptitude practice and core CS revision instead of the 2-D DP day.
Microsoft, Adobe, AtlassianStrong on trees, linked lists and clean code; add one LLD-style problem (LRU cache is already on Day 9).

Company processes change, so confirm the round structure with your recruiter early. They will usually tell you the number and type of rounds if you ask.

If you are working full time

Mornings tend to beat evenings for the "solve" block, because problem-solving quality drops sharply after a workday. A pattern that works for many people is a 6:30–8:00 am solve block plus a 30-minute evening re-solve and log. More on fitting prep around a job is in preparing while working full time.

Mistakes That Waste a 30-Day Prep Window

Mistake 1

Watching instead of solving

Watching a two-hour video playlist feels like progress. Allow at most 20 minutes of learning content per day and solve the rest.

Mistake 2

Never re-solving

If a problem is in your log as "hint" and you never revisit it, you have not learned it. The re-solve block is non-negotiable.

Mistake 3

Leaving DP and graphs for the end

The plan puts them in week 3 on purpose, with week 4 as buffer. If you slip, you lose revision time, not the hardest topics.

Mistake 4

First mock on Day 29

Communication, pacing and handling hints all improve with reps. One mock tells you what is wrong; you need later mocks to fix it.

Mistake 5

Counting problems, not patterns

"I did 200 problems" means little. "I can recognise and implement 15 patterns from a blank editor in 20 minutes" is what gets offers.

Mistake 6

Ignoring the non-coding rounds

Projects and behavioural rounds can veto an otherwise strong coding performance. They get small, steady slots from week 1.

If you finish the 30 days and the interview gets postponed, which happens often, don't start a new sheet. Keep the routine at half intensity: two re-solves and two fresh mixed mediums a day, plus one mock a week. That keeps you at peak without burning out.

✅
Your Day 0 to-do listBlock the calendar slots now, create the error log spreadsheet, run the 90-minute diagnostic, find one mock partner, and email the recruiter to confirm the round structure. Doing these five things tonight is what separates the people who finish the plan from the people who bookmark it.

Frequently Asked Questions

Is 30 days enough to prepare for a coding interview?▾
It is enough if you already know one language well and have seen basic data structures before, and you can give it two to three focused hours on weekdays and more on weekends. Thirty days will not make you a strong competitive programmer, but it is enough to cover the 15 or so patterns that most interview questions reuse and to practise explaining them under time pressure. If you are starting from zero, treat this as the first month of a three-month plan.
How many LeetCode problems should I solve in 30 days?▾
Around 110 to 130 problems with deliberate re-solves is a realistic and effective target for a working professional. That is roughly four new problems a day plus re-solving one or two older ones. Solving 300 problems shallowly is worse than solving 120 that you can reproduce and explain from scratch.
Should I do easy, medium or hard problems in a one-month plan?▾
Mostly mediums. Use one or two easies per topic to learn the pattern, then spend most of your time on mediums because that is what product-company interviews mostly ask. Attempt a few classic hards such as Trapping Rain Water, Merge k Sorted Lists and Word Ladder, but do not sink whole evenings into obscure hards.
How many hours a day should I study for a coding interview in a month?▾
About two to three hours on weekdays and five to six hours on weekend days gives roughly 100 to 120 hours over the month, which is what this plan assumes. If you only have one hour a day, cut the problem list to the starred core problems and extend the plan to six weeks rather than skipping topics.
When should I start mock interviews in a 30-day plan?▾
Start in week two, not at the end. Do one light mock around Day 10, then roughly two a week from Day 17 onwards, ending with a full loop simulation around Day 26 to 28. Early mocks expose communication and speed problems while there is still time to fix them.
What should I do the day before a coding interview?▾
Do not learn new topics. Re-solve three or four problems you already know from your error log, review your pattern cheat sheet, prepare your introduction and two project stories, check your setup if the interview is remote, and sleep properly. Fresh recall matters more than one extra problem.
Should I also prepare system design in a 30-day coding plan?▾
If you have more than about two years of experience, yes: most product companies include a design round at that level. This plan reserves weekend slots in weeks three and four for system design basics and behavioural stories. Freshers can usually replace those slots with more DSA and core CS subjects such as OS, DBMS and networks.

Want a Coach for These 30 Days?

Prepflix's DSA program gives you this plan with live pattern classes, mock interviews and personal feedback so the month actually converts into an offer.

Explore the Prepflix Course →
Pranjal Jain
Pranjal Jain

Ex-Microsoft SDE · IIT Kanpur · Founder of Prepflix. Helps engineers crack startup and product company interviews across India.