Home › Blog › Coding Interview in 2 Weeks

How to Prepare for a Coding Interview in 2 Weeks: A Day-by-Day Plan

A 14-day plan for candidates who already know their data structures: which patterns to cover first, how many problems a day, when to run mock interviews, what to skip, and how to spend the night before.

To prepare for a coding interview in two weeks, spend about three focused hours a day on the highest-frequency patterns first (arrays and hashing, two pointers, sliding window, binary search, trees and graphs), solving three or four new problems a day in the first week (two or three in the second) and re-solving the ones you missed. Start timed mock interviews on Day 9, use Days 12 and 13 for company-specific practice, and keep the last day for light review. That adds up to roughly 40 new problems and about 30 re-solves, which is enough if you already have a CS foundation.

Tech Interview Handbook estimates that it takes about 30 hours to cover the bare minimum and around 100 hours to be well prepared. Fourteen days at three hours a day is about 42 hours: past the minimum, well short of thorough. So this plan is depth-first on purpose. It covers fewer topics, well enough to solve them on a timer while explaining yourself. If you have more than two weeks, our 8-week FAANG prep plan is the better fit.

Before Day 1: set up in one evening

Pattern priorities: what to cover, in what order

With two weeks, order matters more than coverage. Tech Interview Handbook's algorithm study guide ranks arrays, strings, sorting and searching, matrices, trees and graphs as high priority; hash tables, recursion, linked lists, queues, stacks, heaps, tries and intervals as mid priority; and dynamic programming, binary (bit manipulation), math and geometry as low priority. Adjusted for a 14-day window, that becomes four tiers:

TierPatternsWhere in the plan
Must coverArrays and hashing, two pointers, sliding window, binary search, tree DFS and BFS, graph BFS and DFS on gridsDays 1–8
Should coverStack, linked list, heap and top-K, intervals, topological sort, backtrackingDays 3–10
Only the basicsOne-dimensional dynamic programmingDay 11
Skip for nowAdvanced DP, tries, union-find, segment trees, bit tricks, math and geometry puzzlesAfter the interview

For the prompt clues that signal each technique, see our guide to the 15 core LeetCode patterns.

The daily routine (about three hours)

BlockTimeWhat you do
Warm-up re-solves30 minRe-solve one or two earlier problems from a blank editor, out loud.
New problems2 hoursThree or four new problems at 25–30 minutes each. Say the approach and Big-O before you code.
Review20 minRead a strong solution for every problem, including the ones you solved, and update the pattern log.
Re-queue10 minAnything you needed help with goes back on the list for two days later.

The 14-day plan, day by day

The plan assumes your interview is on Day 15. Problem titles are LeetCode names and are examples, not requirements; swap in equivalents from whatever list you are using.

DayFocusNew / re-solveExample problems
1Arrays and hashing, plus one cold timed medium as a baseline4 / 0Two Sum, Contains Duplicate, Group Anagrams, Product of Array Except Self
2Two pointers and sliding window4 / 23Sum, Container With Most Water, Longest Substring Without Repeating Characters, Longest Repeating Character Replacement
3Binary search and stack4 / 2Binary Search, Find Minimum in Rotated Sorted Array, Search in Rotated Sorted Array, Valid Parentheses
4Linked lists and intervals4 / 2Reverse Linked List, Linked List Cycle, Merge Intervals, Insert Interval
5Tree DFS and recursion4 / 2Invert Binary Tree, Maximum Depth of Binary Tree, Validate Binary Search Tree, Lowest Common Ancestor of a Binary Search Tree
6Tree BFS and heaps4 / 2Binary Tree Level Order Traversal, Kth Smallest Element in a BST, Top K Frequent Elements, Kth Largest Element in an Array
7Catch-up: no new topics; re-solve every Week 1 miss on a timer, then take the evening off0–1 / 6Your re-queue
8Graphs: grids, BFS and DFS3 / 2Number of Islands, Rotting Oranges, Clone Graph
9Topological sort, then mock interview #12 / 2Course Schedule, Course Schedule II
10Backtracking3 / 2Subsets, Permutations, Combination Sum
11One-dimensional DP, then mock interview #23 / 2Climbing Stairs, House Robber, Coin Change
12Company-specific problems, introduction and questions to ask3 / 2Recent company-tagged mediums
13Mini mock loop, then re-solve whatever you missed0 / 4Your re-queue
14Light review, setup check, early night0 / 2Two easy warm-ups

Week 1: the high-frequency core

Day 1's cold medium is a diagnostic, not a test. Pick a problem you have not seen, set a 30-minute timer and talk out loud. Note where you stalled: understanding the prompt, finding the approach, or turning the approach into working code. That tells you where review time should go.

Day 7 is deliberately light. If you fell behind, it absorbs the slip; if not, re-solving a week of misses is the best use of the day.

Week 2: graphs, recursion and real conditions

Graphs and backtracking are where rusty recursion shows, so give them full days. Dynamic programming gets one day and only the one-dimensional form: Tech Interview Handbook marks its DP week as optional in the 50-question schedule and ranks DP low in its topic list. If you know your target company leans on DP, trade Day 10's backtracking for a second DP day. In Week 2, new problems drop to two or three a day to make room for mocks.

Mock interviews: when, how many, and how to run them

Tech Interview Handbook suggests starting mock interviews once you are about 60% of the way through your plan. In a 14-day plan, that is Day 9. Three mocks are enough:

  1. Day 9: one 45-minute coding mock. Expect it to feel worse than solo practice; that gap is what you are there to find.
  2. Day 11: one coding mock plus ten minutes of behavioral questions.
  3. Day 13: a mini loop: two 45-minute coding mocks back to back with a short break, then a behavioral round.

Run every problem, in mocks and in solo practice, through the same sequence so it becomes automatic under pressure:

  1. Restate the problem and ask about input size, duplicates, empty input and other edge cases.
  2. Work one or two small examples by hand.
  3. State a brute-force approach and its complexity.
  4. Improve it, naming the repeated work you are removing.
  5. Write the code, narrating as you go.
  6. Test with your examples and the edge cases, then state the final time and space complexity.

This matches Tech Interview Handbook's coding techniques, which note that mentioning the best possible time complexity reads as a positive signal, and Amazon's advice to check edge cases and runtime complexity.

For a partner, trade sessions with a friend or classmate, or use a practice service; Tech Interview Handbook points to interviewing.io for anonymous practice interviews with engineers. When nobody is free, a free AI mock interview in CoPilot Interview covers the speaking part: paste the job description and your résumé, set the mix toward coding and technical questions, and the AI interviewer reads each question aloud, listens to your answer and scores it with what worked and what to improve.

Days 12 and 13: make it company-specific

By Day 12 the general patterns are in place. The last two working days are for your specific loop.

What to skip with only two weeks

The night before and the morning of

On the morning of the interview, do one easy problem out loud 60 to 90 minutes beforehand to warm up, keep water and paper nearby for sketching examples, and join a few minutes early to test your audio.

Rehearse your Day 9, 11 and 13 mocks out loud

CoPilot Interview's free plan includes AI mock interviews: paste the job description and your résumé, pick the level and a coding-heavy mix, and get a score on every spoken answer, then an interview report with likely next-round questions and practice drills. 15 minutes a day, no credit card.

Try a free AI mock interview

FAQ

Can you prepare for a coding interview in 2 weeks?

Yes, if you already know the core data structures. Two weeks at about three hours a day is roughly 42 hours, above the 30 hours Tech Interview Handbook estimates for the bare minimum, so focus on high-frequency patterns and timed practice rather than full coverage.

How many LeetCode problems should I do in 2 weeks?

About 40 new problems plus around 30 re-solves of the ones you missed: three or four new problems a day in the first week and two or three in the second, when mock interviews take more time. Being able to re-solve them on a timer matters more than the count.

How many hours a day should I study for a coding interview?

Plan on about three focused hours a day. Tech Interview Handbook's longer preparation advice uses two to three hours a day; if you can only manage two, cut new problems before you cut re-solves.

Should I study dynamic programming if I only have two weeks?

Only the one-dimensional basics, late in the plan. Tech Interview Handbook ranks dynamic programming as low priority and marks it optional in its condensed question schedule, so cover arrays, trees and graphs first.

When should I start mock interviews?

Around Day 9, about 60% of the way through the plan, which matches Tech Interview Handbook's advice. Do a second one on Day 11 and a back-to-back mini loop on Day 13.

What should I do the night before a coding interview?

Stop new problems by early evening, read through your pattern log, re-solve two easy problems out loud, check your setup and logistics, and go to bed on time.