Day 28 Β· The toolkit test

Week 4 Checkpoint: Pattern Drill

You will be able to
  • Recognize which pattern a fresh problem wants within 60 seconds of reading it
  • Solve four problems under time pressure using the think-aloud protocol
  • Grade your own solutions against a rubric covering correctness, complexity, and communication
  • Start the interview error log β€” the living artifact you will keep through Day 179
Today's ~125 minutes
Guided: 60-second diagnosis drill (timed)15 min
Guided: set up error_log.md + seed entries10 min
Practice: spaced-rep sweep of the Week 4 deck15 min
Project: timed 4-problem drill (15 min each)60 min
Self-scoring, error-log entries, commit15 min
Quiz + journal baseline note10 min

Builds on: Day 22 β€” Big O & complexity Β· Day 23 β€” Arrays & hashing Β· Day 24 β€” Two pointers & sliding window Β· Day 27 β€” Recursion & divide/conquer

The analogy

A mechanic's apprenticeship exam is never "name every tool on the wall." It is a car with four hidden faults and a ticking clock. The examiner isn't checking whether you own a torque wrench β€” they're checking whether, hearing a rattle, your hand moves toward the right drawer *without deliberation*. This week you filled five drawers: hashing, pointers and windows, stacks and queues, linked lists, recursion. Today is the car.

Two things make today different from just "more problems." First, time pressure, on purpose: recognition under pressure is a different skill from recognition at leisure, and it only develops under actual pressure. Second, the error log β€” the single highest-leverage habit in interview preparation. Every mistake you make today gets written down in a specific format: what the problem was, what you did, what you should have done, and the *cue you missed*. Champions in every field keep this log. Six months of "I keep missing the shrink-condition in windows" beats a thousand un-reflected practice problems, because the log turns each mistake from a repeated tax into a one-time tuition payment.

Why this matters on the job

This drill is a dress rehearsal for real coding interviews (Days 35, 84, 179 escalate it), but the deeper skill is professional: pattern recognition under pressure is what an FDE does in a customer meeting when someone describes a slow pipeline and you hear "hidden O(n²), needs a hash map" in real time. The error log habit transfers even further — it is the same log→case→fix loop you'll run on production LLM failures on Day 143. Self-scoring against a rubric also builds the calibration muscle that Day 135's LLM-as-judge work demands: grading honestly is a skill, and it starts on your own work.

Guided practice

guided 1

Warm-up: the 60-second diagnosis drill

15 min

No coding β€” diagnosis only. For each problem statement below, write: the pattern, the key data structure, and expected complexity. 60 seconds each, timed. Answers at the bottom β€” score yourself before peeking.

  1. Given a string, find the length of the longest substring containing at most two distinct characters.
  2. Given a sorted array and a target, return whether any pair sums to it.
  3. Given a list of temperatures, for each day find how many days until a warmer one.
  4. Given a nested list of ints of arbitrary depth, return the maximum value.
  5. Given an array, return true if any value appears at least twice.
  6. Given a linked list, return the node where a cycle begins (or None).
  7. Given a string of brackets, determine the minimum additions to make it valid.
  8. Given an array, find the k most frequent elements.

Score: 7–8 = drawers are labeled; 5–6 = review the misses' days tonight; ≀4 = redo the week's flashcard decks before the timed drill.

🐍 python β€” editable, runs in your browser
Ctrl/⌘+Enter runs · Tab indents · numpy/pandas/sklearn auto-load on import (torch and network calls need a local run)
guided 2

Set up the error log

10 min
  1. Create error_log.md in your practice repo with the four-field template from the tech section and a header explaining (to future-you) what this file is for.
  2. Seed it with your first entries: any diagnosis you missed in the warm-up gets one, written in full format. If you went 8/8, log the SLOWEST diagnosis instead β€” hesitation is data too.
  3. Add a standing section at the top called "Cues to re-read before every drill" β€” it starts empty and accumulates your personal misfire patterns.
  4. Commit. This file gets an entry after every mock interview from now to Day 179 β€” treat its honesty as sacred: nobody reads it but you, so a flattering error log is a useless one.

On your own

Spaced-rep sweep before the drill

15 min

Run the full Week 4 flashcard deck (Days 22–27, ~30 cards). For every card you fail, do a 60-second active repair: open that day's patterns.md section (not the full lesson), re-derive the idea, close it, and answer the card again from memory.

Goal: deck at β‰₯90% before the timed drill β€” going in warm is the point of a checkpoint day.

Hints: cards failed twice in a row get written on today's error log under "Cues to re-read" β€” a flashcard you keep failing is a cue you keep missing.

Ship before you stop

The timed drill β€” four problems, 60 minutes, self-scored

Simulate the real thing: timer visible, no notes, no patterns.md, think-aloud protocol OUT LOUD for every problem. The set, one per drawer: (1) hashing β€” given two strings, return all characters that appear in both with the minimum of their two counts; (2) window β€” longest substring of s containing no character from a given banned set... wait, too easy? then: longest substring with at most k repeats of any single character; (3) stack β€” evaluate a postfix expression ("3 4 + 2 *" β†’ 14); (4) recursion β€” given a nested list, return a flat list with all ints doubled. 15 minutes each. Then switch to examiner mode: score each against the rubric below, write error-log entries for everything that went wrong, and commit solutions + updated log. Your score is a baseline, not a verdict β€” Day 35 measures the delta.

Rubric β€” check what you completed (0/5)

Common mistakes & misconceptions

  • Skipping the think-aloud protocol when alone. The protocol under pressure is the skill being trained; silent solving trains a different (easier) skill and the gap shows up in real interviews.
  • Grading yourself generously. "Almost worked" is a fail with a lesson in it; the error log only compounds if entries are honest. Nobody reads it but you.
  • Writing error-log root causes like "careless" or "rushed". Those are moods, not causes. "Did not test the empty input" is a cause β€” it implies the fix.
  • Treating a low baseline as bad news. Day 28 exists to LOCATE the gaps while they are one week old; the score that matters is the Day 35 delta.
  • Reviewing by rereading patterns.md instead of re-solving. Recognition returns fast under rereading and vanishes under pressure β€” only retrieval sticks.
  • Skipping the spaced-rep sweep to save time for the drill. Cold-start failure tells you less than warmed-up failure: the sweep separates "never learned" from "can't retrieve under pressure".
Knowledge check

Q1. Problem: "longest contiguous run of days with total rainfall under X." First drawer to open?

Q2. Why does today's drill MIX patterns instead of drilling one at a time like Days 23–27?

Q3. The most useful field in an error-log entry is…

Go deeper β€” curated resources

courseNeetCode Roadmap β€” practice pool for extra drill problems β†—20 minrepoTech Interview Handbook β€” coding interview best practices (repo) β†—20 mintoolVisuAlgo β€” verify any structure you misremembered today β†—10 min
If you have a third hour
  • Make the drill recurring β€” Schedule a weekly 30-minute mini-drill (two unlabeled problems from the NeetCode pool) every weekend through Phase 2. Small, repeated, interleaved doses beat cramming before Day 35 β€” the SM-2 principle applied to problem-solving itself.
Done means
  • Diagnosis drill scored; misses logged
  • error_log.md created, seeded, and committed with the four-field format
  • Timed drill done under real conditions: no notes, protocol aloud, timer visible
  • Baseline recorded in journal; quiz β‰₯ 2/3
How this connects

← Back: Everything drilled today was built Monday-to-Saturday: Day 22's complexity language, Day 23's hash patterns, Day 24's pointers and windows, Day 25's LIFO/FIFO, Day 26's pointer surgery, Day 27's recursion.

Forward β†’: Day 35 reruns the drill over trees, graphs, and DP and measures your delta. The error log rides along to every mock (Days 84, 179). Interleaved retrieval under pressure is also exactly how Day 134's eval mindset treats an LLM: fixed unlabeled cases, honest scoring, tracked over time.

Unlocks: D84 Week 12 Checkpoint + Interview Drill II Β· D175 Week 25 Checkpoint: Debrief & Gap Closure