Guides · Prep timelines and study plans

How to prepare for a coding interview in 3 days, hour by hour

2026 · ~8 min read · OfferPilot AI

Seventy-two hours is roughly eighteen usable study hours once you subtract sleep, work and food. Spend all of them re-solving six patterns you have already met at least once: two pointers, sliding window, BFS or DFS on a grid, binary search on the answer, hashmap counting, and heap top-k. Learn nothing new. Finish with five timed re-solves spoken out loud and a ten-line index card you write by hand.

The six patterns, and the one line you have to recall for each

Three problems per pattern, eighteen in total. The third column is the one that matters: in a live round there is no time to re-derive the idea, so the first move has to arrive on its own.

PatternWhat triggers it in the promptThe line you must recallRe-solve these three
Two pointers "sorted array", "a pair that sums to", "in place", "remove duplicates" Move the pointer that cannot possibly improve the answer. Two Sum II, Container With Most Water, 3Sum
Sliding window "longest" or "shortest" subarray, "at most k", "without repeating" Always extend right. Shrink left only while the window is invalid. Longest Substring Without Repeating Characters, Minimum Size Subarray Sum, Max Consecutive Ones III
BFS / DFS on a grid "grid", "islands", "regions", "spreads each minute", unweighted shortest path Mark a cell visited when you push it, not when you pop it. Number of Islands, Rotting Oranges, Max Area of Island
Binary search on the answer "minimum X such that", "maximum Y such that", and the answer is monotonic Write feasible(x) as its own boolean function before the search. Koko Eating Bananas, Capacity To Ship Packages Within D Days, Split Array Largest Sum
Hashmap counting "anagram", "frequency", "subarray sums to k", "duplicate within k indices" Store what you have seen so far, then look up the complement. Group Anagrams, Subarray Sum Equals K, Contains Duplicate II
Heap top-k "k largest", "k most frequent", "k closest", "merge k" Min-heap of size k for the k largest. Push, then pop once the size exceeds k. Kth Largest Element in an Array, Top K Frequent Elements, K Closest Points to Origin

The do-not-touch list

For the next three days, do not open DP on trees, segment trees, tries, or backtracking permutations. Not a tutorial, not a video, not one problem.

The reason is how recall behaves under adrenaline. A pattern first met 40 hours before a round lands in recognition memory, not retrieval memory. You will read the prompt, feel the flicker of "I saw something like this on Tuesday", then burn twelve minutes rebuilding a structure you never owned while an interviewer watches a cursor that is not moving. The honest alternative actually scores: "This is a prefix-lookup problem, so the clean answer is a trie. I have not implemented one recently, so let me write the hashmap-of-prefixes version, get it correct, then talk through what the trie would buy us." Interviewers hire for that sentence. Nobody is hired for a half-remembered build().

These four also turn up far less often in a 45-minute screen than the six above, so the trade is negative before you even price in the panic.

The 72-hour schedule

Times are offsets from the hour you start. Six working hours on day one, seven on day two, five on day three, then a hard stop. If your day realistically holds four, cut problems from each block. Never cut the cold-recall blocks or the sleep.

Day 1, T+0 to T+24, calibrate and rebuild two patterns

  • T+0 to T+0:45. Diagnostic. Solve one problem you know cold, Valid Anagram or Two Sum, on a timer, narrating out loud, in a plain editor with autocomplete off. You are measuring how much slower you get when talking and typing at once.
  • T+0:45 to T+1:15. Write your template once and reuse it all week: signature, a guard for empty and single-element input, the loop, the return. Same shape every time, so the shape stops costing attention.
  • T+1:15 to T+3:15. Two pointers, the three problems above, roughly 40 minutes each.
  • T+3:15 to T+4:00. Walk. No screen. This block is doing real work.
  • T+4:00 to T+6:00. Sliding window, the three problems above.
  • T+6:00 to T+6:30. Write lines 1 and 2 of your index card, by hand.
  • Then stop. Seven hours of sleep minimum. Consolidation is what turns today into something retrievable, and it cannot be bought back later.

Day 2, T+24 to T+48, four patterns and the first real test

  • T+24 to T+24:30. Cold recall. On paper, from memory, write the two-pointer and sliding-window skeletons. No editor, no notes. If you cannot, redo one problem from each. This half hour is the part people skip and the part that works.
  • T+24:30 to T+26:30. BFS and DFS on a grid, all three with an explicit queue or stack rather than recursion, so stack depth is never what breaks you live.
  • T+26:30 to T+28:30. Binary search on the answer. Write feasible(x) first, every time, before the loop.
  • T+28:30 to T+29:15. Break, food, off the machine.
  • T+29:15 to T+31:15. Hashmap counting.
  • T+31:15 to T+33:15. Heap top-k.
  • T+33:15 to T+33:45. Index card lines 3 to 6, then sleep.

Stuck for more than fifteen minutes on one problem, stop and read a worked solution. Fifteen minutes is the budget, because the scarce resource this week is patterns covered, not stubbornness. This is where a tool earns its place: Code Copilot captures the problem off the screen with Ctrl+Alt+S and returns the intuition, a dry run and the Big-O, with Gemini as the model to read for coding. Then close the window and re-derive it on paper. Reading a good solution feels like learning and is not.

Day 3, T+48 to T+72, five timed re-solves, then stop

  • T+48 to T+49. Cold recall of all six skeletons on paper, ten minutes maximum each.
  • T+49 to T+51:30. The five-problem set below. Twenty-five minutes each, timer visible, spoken aloud, webcam on, plain editor.
  • T+51:30 to T+52:30. Post-mortem. For each of the five, write the one sentence you fumbled while narrating. Those go on the back of the card.
  • T+52:30 to T+53:30. Three behavioural stories, out loud, two minutes each. Most technical screens open with one, and freezing on "tell me about a project" costs what freezing on an array costs. The company Q&A generator will build prompts to rehearse against.
  • T+53:30 onward. Hard stop. Sleep, then in the morning read the card twice and nothing else. Do not open a new problem 90 minutes before the round: failing an unfamiliar one costs more confidence than a solve buys.

The five-problem final set

These five cover all six patterns between them, which is the reason for the selection.

Longest Substring Without Repeating Characters

Sliding window and hashmap counting in one. If the left pointer ever moves backwards, you have shipped the usual bug.

Number of Islands

Grid traversal. Say out loud whether you are mutating the grid or keeping a visited set, and why.

Koko Eating Bananas

Binary search on the answer. Name the bounds and the monotonic property before writing the loop.

Top K Frequent Elements

Counting map into a size-k heap. State the O(n log k) and why it beats sorting for small k.

3Sum

Two pointers with duplicate handling, the step everyone fumbles under pressure. Get the skip-duplicates lines right without looking.

The ten-line index card, written by you

One side of one card, in your own handwriting. The compression is the revision, which is why a card someone else wrote is worth nothing to you. Six lines are patterns, four are scaffolding, and the scaffolding is what keeps you talking in the minute where nothing is coming.

  1. Two pointers: the trigger, and your first move.
  2. Sliding window: the trigger, and your first move.
  3. Grid BFS or DFS: the trigger, and your first move.
  4. Binary search on the answer: the trigger, and your first move.
  5. Hashmap counting: the trigger, and your first move.
  6. Heap top-k: the trigger, and your first move.
  7. Your language's idiom for a counting map, defaultdict(int) or getOrDefault.
  8. The three edge cases you personally forget: usually empty input, one element, all values identical.
  9. The exact words you say when stuck: "Let me state the brute force, get that working, then optimise."
  10. The exact words you say when finished: "Time is O(...), space is O(...), and the case I would want to test next is ..."

Where this plan does not work

This is a re-solve plan, not a learn-from-scratch plan. If you have genuinely never written a breadth-first search, three days will not fix that. Cut to three patterns instead of six, two pointers, hashmap counting and grid traversal, and redefine success as not freezing. If your round is system design or a multi-day take-home, none of the schedule above applies.

Be equally clear-eyed about tooling. OfferPilot AI runs on Windows 10 and 11 only, and its overlay is excluded from screen capture at the operating-system level, so it does not appear in Zoom, Teams, Meet or a screen recording. That is a fact about screen sharing and nothing more. It does nothing about a webcam, a lockdown browser, a proctor in the room, or a phone camera pointed at your desk, and where an assessment forbids outside assistance the useful window is the three days before, not the round itself. It also cannot rehearse for you: what makes a pattern survive pressure is reproducing it from a blank page, which is why every block above ends on paper.

What to do in the next hour

Set a timer, run the T+0 diagnostic, write your template. If you want the fifteen-minute rule enforced by something faster than hunting for an editorial, the free tier gives five minutes a day with no card, and Pro is $39/month. The card, though, you write yourself.

Related guides

Three days is enough to sharpen six patterns.

Capture a problem, read the intuition and the Big-O, then close it and re-derive it yourself.