Skip to content
L5 Prep

Week 01 β€” Baseline + foundations

35 tickable tasks. Every problem: plain doc, timer running, spoken out loud.

Week 01 tasks complete0 / 0

Ticks are saved in this browser only.

Theme: Find out where you actually are, then rebuild the primitives. Budget: ~14 hrs. New problems: 18 core + 3 stretch (marked β˜†). Exit criterion: you can write a correct binary search that handles duplicates β€” first pass, no debugging.

Every problem: plain doc, timer running, spoken out loud, no autocomplete, no running the code. Log every attempt in 05-practice-log.md the moment you finish. Non-negotiable.


Day 0 β€” Setup (30 min, before Monday)

  • Create a Google Doc named interview-scratch. Set font to Consolas or Courier New, 11pt. Turn off spellcheck and autocorrect (Tools β†’ Preferences β†’ uncheck automatic substitution). This is your only coding surface for 8 weeks.
  • Put a visible countdown timer on a second screen or phone. Not a stopwatch β€” a countdown, so time pressure is felt.
  • Decide your language and commit to it. Whatever you’re fastest in. Do not switch mid-prep.
  • Write your language’s cheat-sheet page in the doc, from memory: how to declare a hashmap/set/heap/deque, sort with a custom comparator, and do integer division. You will fumble these under pressure otherwise.
  • Open 05-practice-log.md and keep it open.

Day 1 (Mon) β€” Cold baseline Β· 2 hrs

Do not look anything up. Do not skip a problem because it looks hard. The point is an honest measurement, not a good score. A bad baseline is useful data; a dishonest one wastes eight weeks.

Timed block β€” 75 min (25 min each, hard stop):

# Problem LC Category being measured
1 3Sum 15 Two pointers + dedup discipline
2 Number of Islands 200 Grid traversal
3 Coin Change 322 DP recurrence derivation

Review block β€” 45 min:

  • For each: did you solve it unaided in 25 min? Was the code correct before debugging?
  • For each miss, write the specific reason in the log. Not β€œI forgot DP” β€” rather β€œI couldn’t state the recurrence; I jumped to a table.”
  • Only now look up the intended solutions. Re-read yours side by side.
  • Add every miss to the Redo queue. They come back on Day 7.

Calibration: 3/3 unaided β†’ you’re closer to Week 3, tell me and I’ll re-scope the plan. 1–2/3 β†’ this plan is correctly sized. 0/3 β†’ still fine, but expect Weeks 1–4 to run hot; consider 12 weeks.


Day 2 (Tue) β€” Binary search from first principles Β· 2 hrs

Binary search is the highest ratio of asked to reliably-written of any primitive. Most engineers write it 90% correct, which is 0% correct.

Derivation block β€” 45 min. No reference material.

  • Write three separate functions and name them properly:
    • find_exact(a, t) β†’ any index of t, or βˆ’1
    • lower_bound(a, t) β†’ first index with a[i] >= t
    • upper_bound(a, t) β†’ first index with a[i] > t
  • Use mid = lo + (hi - lo) // 2 and be able to say why.
  • Write down your loop invariant in words above each function. If you can’t state the invariant, you don’t have it memorized β€” you have it half-memorized, which is the dangerous state.
  • Hand-trace all of these on paper:
[]              t=1     empty
[5]             t=5     single, hit
[5]             t=3     single, miss low
[5]             t=9     single, miss high
[1,2]           t=2     two elements, upper
[2,2,2,2]       t=2     all duplicates, present
[2,2,2,2]       t=3     all duplicates, absent
[1,3,5,7]       t=0     below range
[1,3,5,7]       t=9     above range

Problem block β€” 75 min:

# Problem LC Why
4 Binary Search 704 Warm-up, confirm the template
5 Find First and Last Position 34 Forces lower/upper bound to be genuinely correct
6 Search in Rotated Sorted Array 33 Invariant reasoning on a broken sort order
7 Koko Eating Bananas 875 Binary search on the answer β€” Google’s favorite variant

β˜† Stretch: Find Minimum in Rotated Sorted Array II (154) β€” the duplicates case that breaks the naive invariant.


Day 3 (Wed) β€” Two pointers + prefix sums Β· 2 hrs

Problem block β€” 100 min:

# Problem LC Why
8 Container With Most Water 11 The greedy pointer-move argument β€” be able to prove it
9 Subarray Sum Equals K 560 Prefix sum + hashmap; the pattern behind a dozen questions
10 Product of Array Except Self 238 Prefix/suffix in O(1) extra space
11 Trapping Rain Water 42 Hard. Do the two-pointer version, not the DP one

Recall block β€” 20 min:

  • Close everything. Rewrite #9 (Subarray Sum Equals K) from memory, start to finish. Rewriting from memory 24 hrs later is what moves a pattern into long-term storage β€” reading the solution again does almost nothing.

Day 4 (Thu) β€” Sliding window Β· 2 hrs

Derivation block β€” 20 min:

  • Write the generic variable-window template in your own words β€” expand right, contract left while the invariant is violated, record the answer. One template covers every problem below. Write it once, then instantiate it four times.

Problem block β€” 100 min:

# Problem LC Why
12 Longest Substring Without Repeating Characters 3 The canonical instantiation
13 Longest Substring with At Most K Distinct 340 Counting map + shrink condition
14 Longest Repeating Character Replacement 424 Non-obvious invariant (window βˆ’ maxCount ≀ k)
15 Minimum Window Substring 76 Hard. The one everyone half-remembers. Get it fully right.

β˜† Stretch: Permutation in String (567) β€” fixed window, cheap win.


Day 5 (Fri) β€” Behavioral brain dump Β· 1 hr

Raw material only. No STAR formatting, no polishing. You cannot write good stories from a blank page in Week 6; you write them from a list you made in Week 1.

  • In 04-behavioral-story-bank.md, list every project, incident, migration, launch, and disagreement from the last 3 years. Target 12–18 raw entries.
  • For each, one line each, fast:
    • What was it?
    • What did I specifically own?
    • What was the hardest decision (not the hardest task)?
    • Who disagreed with me, and what happened?
    • Any number attached to the outcome?
  • Star the 3 with the largest blast radius beyond your own team β€” those become your anchor stories.

If you’re drawing a blank: scan your calendar, PR history, and Slack/email from the last 3 years. Memory is a terrible index.


Day 6 (Sat) β€” Mixed timed set + primitives Β· 3 hrs

Timed set β€” 75 min (25 min each, mixed categories, no hints). Mixing is the point: real interviews don’t tell you the topic.

# Problem LC Category
16 Longest Consecutive Sequence 128 Hashing, O(n) argument
17 Merge Intervals 56 Sorting + intervals
18 Minimum Size Subarray Sum 209 Window (unannounced)

Primitives block β€” 60 min. From memory, no reference:

  • Lomuto partition and Hoare partition. Know which one quickselect prefers and why.
  • Quickselect β†’ solve Kth Largest Element in an Array (215) with it. State the average O(n) and worst O(nΒ²), and how random pivoting fixes it.
  • Iterative inorder traversal with an explicit stack β€” Binary Tree Inorder Traversal (94).
  • Iterative preorder β€” Binary Tree Preorder Traversal (144).

Weekly review β€” 45 min:

  • Fill in the Weekly review block in 05-practice-log.md.
  • Compute your two numbers: unaided solve rate and first-pass correctness.
  • Name your single weakest area in one sentence, and one concrete change for Week 2.

Day 7 (Sun) β€” Spaced repetition Β· 2 hrs

Cold re-solves. This is the highest-value block of the week, and the one people skip. Do not replace it with new problems.

  • Re-solve the three Day 1 baseline problems (15, 200, 322) cold, timed at 25 min. Compare against Monday. The delta is your real progress signal.
  • Re-write all three binary search variants from memory again. Re-run the 9 edge cases from Day 2 by hand.
  • Clear the redo queue: anything else you failed this week, re-solve now.
  • Preview Week 2: skim the estimation and non-functional requirements sections of 03-system-design-curriculum.md. 10 min, no notes. Priming only.

Week 1 exit checklist

  • Baseline recorded honestly for all 3 problems
  • All 3 binary search variants written from memory, correct, first pass, including duplicates
  • 18 core problems attempted and logged
  • Every failed problem re-solved at least once on Day 7
  • 12+ raw behavioral entries captured
  • Practice log filled in for every single session β€” no blank rows

If you missed the binary search criterion: do not move on to Week 2’s new topics on Monday. Spend the first 45 minutes of Week 2 Day 1 re-deriving it. It compounds into Weeks 3–4 and it is genuinely cheap to fix now.

How this week fits the 8-week plan (from 01-plan-8-weeks.md)

Goal: find out where you actually are, and rebuild the primitives.

  • Take a cold baseline: 3 medium problems, 25 min each, timed, spoken. Record results in 05-practice-log.md. Do not look anything up.
  • Topics: arrays, strings, two pointers, sliding window, hashing, prefix sums.
  • Re-derive from scratch (write, don’t read): binary search with all three variants (exact, lower bound, upper bound), quicksort partition, iterative tree traversal.
  • Set up your environment: a Google Doc with a monospace font, and a timer. Practice there exclusively.
  • Behavioral: brain-dump every project from the last 3 years into 04-behavioral-story-bank.md β€” raw notes only, no formatting yet.

Exit criteria: you can write a correct binary search that handles duplicates, first pass, no debugging.