Shelf · DSA Patterns · Chapter 9

Chapter 9: A practice system

Knowing the patterns is half the job; the other half is a weekly routine that keeps them recallable and shows which layer is failing. This chapter gives you a rotation, a review queue, a mixed-practice drill, a rubric, a log and a weekly repair step, all sized for 1-2 hours on weekdays and 2-4 on weekends, all editable.

Difficulty
Priority
dsa-09-01Card 1 of 6

Pattern practice system

EasyP5 · SkippableKnow it exists7 min
practicerotationscheduletimed-practice

Why you care

Self-study fails quietly. You solve forty problems in a month, nearly all in the chapter you enjoy, and in the interview you cannot say which area the prompt belongs to. It is a Jenkins job with no schedule, log or alert. Interviewers see its output: whether you clarify, name the pattern, state the cost and test your code. Amazon and Microsoft both describe preparation as fundamentals plus coding and testing practice (S1, S2); neither publishes a topic mix or pass mark. This card is a proposed organisation, not a proven one.

Explain like I'm 5

A gym with a logbook. You follow a split, warm up the basics every session, and write down every lift, so a stalled lift is visible.

Core concept

The rule: every week carries a few new patterns, the same small cross-cutting set, and a log. Six weeks is a rotation you repeat, not a deadline.

  • Rotation: weeks 1-3 cover ch-04 and ch-05, weeks 4-5 add ch-06 and start ch-07, week 6 finishes ch-07 with mixed practice.
  • Every-week set: ch-01 recognition, ch-02 cost, ch-03 structure choice, ch-08 execution, ch-09 logging. Without it, week 5 forgets week 1.
  • Timed vs untimed: untimed while learning an invariant; timed once a week on an unseen problem, with your target employer's format and limit, checked before each cycle.
  • Log, never copy: the log links to the problem site and the existing problem book; it holds no solutions.

Decision rule: budget your real hours first. If a week is short, keep the review queue and the log and cut new problems. Never give each week one chapter: it silently skips three of the nine.

Minimal example Hours and coverage arithmetic

Pythonruns
chapters = {f"ch-0{i}" for i in range(1, 10)}
one_per_week = [f"ch-0{w}" for w in range(1, 7)]
missed = sorted(chapters - set(one_per_week))
print(missed)
floor = 5 * 60 + 2 * 120
ceiling = 5 * 120 + 2 * 240
print(floor, ceiling)
Output
['ch-07', 'ch-08', 'ch-09']
540 1080

Six slots never reach three chapters. Your week is 540 minutes at the floor, 1,080 at the ceiling.

In production Rotation coverage and weekly time budget

Pythonruns
from collections import Counter

ALL = {f"ch-0{i}" for i in range(1, 10)}
EVERY_WEEK = ["ch-01", "ch-02", "ch-03", "ch-08", "ch-09"]
ROTATION = {1: ["ch-04"], 2: ["ch-04", "ch-05"], 3: ["ch-05"],
            4: ["ch-06"], 5: ["ch-06", "ch-07"], 6: ["ch-07"]}
# (day, how many such days, [(activity, minutes)]) - editable defaults
TEMPLATE = [
    ("weekday", 5, [("review queue", 15), ("pattern work", 45)]),
    ("saturday", 1, [("timed attempt", 45), ("log entries", 15), ("repair", 60)]),
    ("sunday", 1, [("recall check", 30), ("mixed set", 30), ("repair", 60)]),
]
AVAILABLE = {"weekday": 60, "saturday": 120, "sunday": 120}

def missing(rotation):
    seen = set(EVERY_WEEK)
    for chapters in rotation.values():
        seen.update(chapters)
    return sorted(ALL - seen)

def week_minutes(template, available):
    totals = Counter()
    for day, count, blocks in template:
        used = sum(m for _, m in blocks)
        if used > available[day]:
            raise ValueError(f"{day}: {used} min planned, {available[day]} available")
        for name, m in blocks:
            totals[name] += m * count
    return totals

print("missing:", missing(ROTATION))
print("missing if rotation empty:", missing({}))
totals = week_minutes(TEMPLATE, AVAILABLE)
print(dict(totals), sum(totals.values()))
try:
    week_minutes([("weekday", 5, [("pattern work", 90)])], AVAILABLE)
except ValueError as e:
    print("ValueError:", e)
Output
missing: []
missing if rotation empty: ['ch-04', 'ch-05', 'ch-06', 'ch-07']
{'review queue': 75, 'pattern work': 225, 'timed attempt': 45, 'log entries': 15, 'repair': 120, 'recall check': 30, 'mixed set': 30} 540
ValueError: weekday: 90 min planned, 60 available

The checker proves all nine chapters are reachable and refuses an over-full day. 540 = 5 x 60 + 2 x 120. The splits are defaults, not findings.

Scenario A

In your world

The situation

Weekdays are 60 minutes after a TCS day, weekends 120 each. You pick whatever the site shows next, usually arrays.

What actually breaks

After six weeks you have 36 accepted submissions: 31 array or string, 3 graph, 2 DP. In a mock you read a grid prompt and cannot say whether it is search, DP or neither.

What you'd do on Monday

Monday morning, make rotation.json, week-template.json with your real minutes, and an empty log.jsonl. Run the checker above against them and book the weekend slots like a release window. Plan against the 540 floor; a plan you cannot finish teaches you to ignore it.

Scenario B

Imagine you work at Notion

5 engineers, 6 weeks, 1 shared sheet

The numbers

Five colleagues start the same rotation. Each adds 3 items a week to their review queue: 3 x 6 = 18 items each, 5 x 18 = 90 log rows. Each person's own queue is 3 x 5 = 15 reviews a week at steady state, 15 x 5 min = 75 min, the template's slot. One shared queue holds 5 x 15 = 75 reviews, 75 x 5 = 375 min.

What the Scenario-A answer does here

Your personal log works for one person. In one sheet with one "next recall" column, everyone sees all 75 due reviews, nobody owns any, and the 375-minute pile is five times anyone's slot. The column turns red and gets ignored.

What flips at this scale

Split shared from personal. Problem links, pattern tags and rubric definitions are shared and append-only; review state (next recall date, scores) is per person, keyed by owner. Queues are computed per owner, so nobody sees a pile that is not theirs.

The trade-off you'd defend

I would defend a shared index with private review state over one shared queue, trading some duplicate logging for queues that fit one person's 75 minutes.

Illustrative; headcount, items per week and 5 minutes per review are assumptions, not Notion-published figures.

Gotchas

One chapter per week

Symptom

The calendar says six weeks, six chapters. In week 6 you find ch-07, ch-08 and ch-09 were never scheduled.

Cause

Nine chapters mapped onto six slots drop three, and the cross-cutting chapters were treated as optional.

Fix

Run missing(ROTATION) after any edit; it must return []. Keep the every-week set.

Timed practice from day one

Symptom

Every attempt ends at the limit with half a solution and no insight into why.

Cause

The clock was applied while you were still learning the invariant.

Fix

Untimed first, then one timed attempt a week on an unseen problem.

Tricky questions

You have 3 hours on Saturday. What do you add?
Most people say

Three more new problems, since new problems move you forward.

Actually

Fill the template slots first (timed attempt, log, repair). Extra time goes to the weakest layer from Review the rotation and choose the next repair or a mixed set, not to more of the pattern you enjoy.

Scenario question

You're handed a free Saturday, a log with 14 entries all in one chapter, and a mock in nine days. Build the next week.

Model answer

I'd run the checker, see which chapters have no entry, give the two weakest one untimed block each, and keep the weekly timed attempt on an unseen problem. The trade-off is breadth over depth: a shallower pass on my favourite chapter for some signal on the others before the mock.

Interview corner

CommonHow do you prepare for coding rounds?
“I run a six-week rotation and repeat it. Each week I mix new patterns with recognition and cost practice, log every attempt, and take one timed attempt on an unseen problem.”
TrickHow many problems have you solved?
“I'd rather give you delayed results: how many I could redo cold after a week, and which layer failed when I couldn't. Raw count shows volume, not recall.”
DesignDesign a practice plan for someone with 9 hours a week.
“I'd budget the minutes first, 540 at the floor, then split into review, pattern work, one timed attempt, log and repair. I'd cut new problems before review and call the split an editable default.”

Memory hook

A gym with a logbook: a split you repeat, warm-ups every session, every lift written down.

If you remember only one thing:

Budget the hours first, and when a week is short cut new problems, never the review or the log.

Self-check

  1. What is the minimum weekly time budget here?

    540 minutes: five 60-minute weekdays and two 120-minute weekend days.

  2. Why does a one-chapter-per-week plan fail?

    Six weeks cover six chapters; ch-07, ch-08 and ch-09 are never scheduled.

  3. When do you use timed practice?

    Once a week on an unseen problem; learning an invariant is untimed.

Prove it

Run the production block with TEMPLATE set to your real minutes. Paste the missing: [] line and the total, then set one weekday to 90 and paste the ValueError. About 25 minutes.

dsa-09-02Card 2 of 6

Spaced recall with adjustable intervals

EasyP5 · SkippableKnow it exists7 min
spaced-repetitionrecallreview-queueintervals

Why you care

Study a pattern once and you recognise it on Tuesday, not the following Monday. The APS review rates practice testing and distributed practice as high utility (S9), but gives no best interval, and nobody has one for DSA. Interviewers hear whether you recall the precondition unprompted or only recognise the shape once it is drawn.

Explain like I'm 5

A kettle that cools. Fresh knowledge is boiling; each unprompted recall reheats it. Reheat often at first, then let the gaps grow. If it went cold, reheat tomorrow, not next month.

Core concept

The rule: recall first, check second, then set the next date from the result.

  • Recall prompt: before opening notes, state the cue, precondition, invariant, template and cost.
  • Default dates: days 1, 3, 7, 14 and 30 after learning. This is an editable default, not a validated schedule.
  • On failure: take feedback, correct it, go back to the first gap.
  • On repeated unaided success: lengthen the gap. The code doubles the last gap past the list; that is also a default.
  • Late is fine: count the next gap from the real review day, or a missed week compresses later reviews into the same days.

Decision rule: use the default gaps while the queue fits the review slot. When it does not, cap the queue and lengthen gaps before dropping items. An item that fails twice in a row leaves spacing and goes to repair in Review the rotation and choose the next repair.

Minimal example Default review dates

Pythonruns
from datetime import date, timedelta

GAPS = [1, 3, 7, 14, 30]  # days after learning; an editable default
learned = date(2026, 3, 2)  # a calendar date in your own local day
print([(learned + timedelta(days=g)).isoformat() for g in GAPS])
Output
['2026-03-03', '2026-03-05', '2026-03-09', '2026-03-16', '2026-04-01']

No time zones: a review day is your own local calendar day.

In production Adaptive review queue with a cap

Pythonruns
from dataclasses import dataclass
from datetime import date, timedelta

OFFSETS = [1, 3, 7, 14, 30]  # days after learning: editable default
STEPS = [b - a for a, b in zip([0] + OFFSETS, OFFSETS)]  # [1, 2, 4, 7, 16]

def gap(step):  # past the list, double the last gap: also editable
    if step < len(STEPS):
        return STEPS[step]
    return STEPS[-1] * 2 ** (step - len(STEPS) + 1)

@dataclass
class Item:
    name: str
    learned: date
    step: int = 0
    last: date | None = None

    @property
    def due(self):
        return (self.last or self.learned) + timedelta(days=gap(self.step))

def review(item, on, recalled):
    base = item.last or item.learned
    if on < base or (item.last and on == base):
        raise ValueError(f"{item.name}: review on {on} not after {base}")
    item.step = item.step + 1 if recalled else 0
    item.last = on  # next gap counts from the real review day

def queue(items, today, cap):
    due = sorted((i for i in items if i.due <= today), key=lambda i: i.due)
    return [i.name for i in due[:cap]], [i.name for i in due[cap:]]

a = Item("range-cue", date(2026, 3, 2))
for on, ok in [(date(2026, 3, 3), True), (date(2026, 3, 9), True), (date(2026, 3, 13), False)]:
    review(a, on, ok)
    print(on, ok, "->", a.due)
try:
    review(a, date(2026, 3, 13), True)
except ValueError as e:
    print("ValueError:", e)
print([gap(s) for s in range(8)])
items = [Item(f"i{n}", date(2026, 3, 1)) for n in range(4)] + [Item("late", date(2026, 3, 5))]
print(queue(items, date(2026, 3, 4), cap=3))
print(queue([], date(2026, 3, 4), cap=3))
Output
2026-03-03 True -> 2026-03-05
2026-03-09 True -> 2026-03-13
2026-03-13 False -> 2026-03-14
ValueError: range-cue: review on 2026-03-13 not after 2026-03-13
[1, 2, 4, 7, 16, 32, 64, 128]
(['i0', 'i1', 'i2'], ['i3'])
([], [])

The pass on 9 March is four days late; the next due date, 13 March, counts from the real review. The fail on 13 March restarts at a one-day gap. A same-day second review raises instead of advancing the step. The queue returns the deferred remainder, so overflow is visible.

See it happen One item through the default checkpoints

planned review dayd8d10d14d21d37unaided recall?pass
  1. You learn the pattern on day 0 and plan reviews on days 1, 3, 7, 14 and 30; nothing is tested yet.
  2. Day 1: you recall cue, precondition, invariant and cost without notes, so the item advances.
  3. Day 3: another unaided pass, and the gap to the next check grows.
  4. Day 7: you cannot state the precondition, which counts as a failure even though you remember the template.
  5. After feedback the schedule restarts from day 7 with gaps 1, 2, 4, 7 and 16, so the new review days are 8, 10, 14, 21 and 37.
  6. Day 8: one unaided pass moves the item to the 2-day gap, so the next review is day 10.
Notice: a failure pulls the next date close again.
Scenario A

In your world

The situation

Your Jenkins pipeline has a nightly schedule you never think about. Your study has none. You solved a window problem on 2 March, felt good, never looked again.

What actually breaks

On 16 March a mock describes a contiguous range with negative values. You reach for the window template, shrink on a sum, and the first test fails. The precondition did not survive 14 days.

What you'd do on Monday

Keep queue.json, one entry per logged item, and run queue(items, today, cap=3) each weekday morning: the 15-minute slot holds 3 reviews, 15 a week. A review is 5 minutes writing cue, precondition, invariant and cost from memory, then checking.

Scenario B

Imagine you work at Rapido

a 2-week gap in an on-call rotation

The numbers

At 3 new items a week, each reviewed five times, steady state is 3 x 5 = 15 reviews a week, 15 x 5 min = 75 min. Running the default offsets in code gives 6, 9, 12, 12 reviews in weeks 1-4, then 15. Two skipped weeks add 2 x 15 = 30 to the 15 of the week you return: 45 due, 45 x 5 = 225 min.

What the Scenario-A answer does here

Your queue works in normal weeks. After the gap, "clear everything" is 225 minutes, three times the slot, and eats the weekend; you then skip the queue again.

What flips at this scale

Cap at what the slot holds: 3 reviews a weekday, 15 a week, oldest due first, deferred count reported. Pause new items until the backlog is under the cap. Clearing 45 at 15 a week takes about 3 weeks, and reviewed items spawn follow-ups, so allow more.

The trade-off you'd defend

I would defend a hard cap with deferral over a clear-all catch-up, trading some items waiting longer than ideal for a queue I will open every day.

Illustrative; the gap, 3 items a week and 5 minutes per review are assumptions, not Rapido-published. The 6/9/12/12/15 ramp comes from running the offsets.

Gotchas

Mistaking re-reading for recall

Symptom

You open the old solution, think "obviously", mark a pass, and days later cannot write the precondition.

Cause

Recognition after a prompt is easier than retrieval from a blank page; the hint did the work.

Fix

Write the recall answer before opening anything. If you looked first, mark it failed.

Scheduling from the due date

Symptom

After a week off every item is due on the same two days and the queue is 40 deep.

Cause

The next date was computed from the planned due date, so late reviews compress.

Fix

Compute from the real review date, as review() does, and cap the daily queue.

Tricky questions

Is day 1, 3, 7, 14, 30 the proven schedule?
Most people say

It is the standard interval set, so use it as given.

Actually

It is a proposed default. S9 supports spacing in general and gives no best interval. Edit OFFSETS to what your recall results and hours support.

Scenario question

You're handed your queue after a two-week release freeze: 45 items due and 75 minutes a week for reviews.

Model answer

I'd cap each weekday at 3 items (15 a week), oldest due first, and pause new problems until the backlog is under the cap. Failed items go back to the one-day gap. The trade-off is that some items wait weeks past their ideal date, so I accept lower recall on those for a queue I can finish.

Interview corner

CommonHow do you retain patterns over weeks?
“I test myself before I look: cue, precondition, invariant, cost, from memory. On failure I shorten the gap; on repeated success I lengthen it.”
TrickWhy not just re-read your notes before the interview?
“Re-reading feels like knowing without testing it. I'd rather find the gap this week by retrieving the precondition from nothing than discover it in the room.”
DesignA friend says 1-3-7-14-30 is scientifically proven. Respond.
“I'd say spacing is well supported in general, but those exact days are a default, not a proven DSA schedule. I'd start there and tune against my own recall.”

Memory hook

A kettle that cools: reheat often at first, let the gaps grow, reheat tomorrow if it went cold.

If you remember only one thing:

Recall from a blank page first, then set the next date from the real review day.

Self-check

  1. What are the default review days?

    1, 3, 7, 14 and 30 days after learning, as an editable default.

  2. What happens after a failed recall?

    Feedback, correction, and the item returns to the first gap.

  3. Why count the next gap from the real review day?

    Counting from the due date compresses late reviews into the same days.

Prove it

Take the production block, load 8 of your own items with real learned dates, and run queue(items, today, cap=5) on three consecutive dates, marking pass or fail by hand. Paste the three printed queues and the due dates after each review. About 30 minutes.

dsa-09-03Card 3 of 6

Mix patterns to test recognition

MediumP5 · SkippableKnow it exists7 min
interleavingrecognitiontransfermixed-practice

Why you care

Same-family drills teach you to execute a template when you already know which one. The interview gives no label. In ETL work it is a transform that passes on the batch you tested and fails when the input type changes. Interviewers ask unlabeled prompts because choosing the pattern separates memorised solutions from learned preconditions. Status: mixing is a curricular design choice here, not a finding of the S9 summary.

Explain like I'm 5

Parking in an empty lot where you are told "parallel park now" is not driving. On a road nobody tells you whether this is a park, a turn or a lane change. Mixed practice is the road.

Core concept

The rule: learn a family in a short block, then test recognition with labels hidden and families mixed.

  • Start blocked: 2-4 drills of one family, so the template exists.
  • Hide labels: you see only the cue. Name the family, its precondition and its cost before coding.
  • Mix studied families only: unstudied ones produce guessing, not learning.
  • Contrast look-alikes: similar cues, different preconditions (a range question with negative values versus without) are the best drills.
  • Score recognition apart from code: right code for the wrong family is a recognition failure.

Decision rule: block while you cannot write the template unaided; mix once you can. If one pair keeps failing, go back to a blocked drill on that pair and its separating precondition.

Minimal example Round-robin across families

Pythonruns
from itertools import zip_longest

blocks = {"A": ["a1", "a2", "a3"], "B": ["b1", "b2"], "C": ["c1"]}
rounds = zip_longest(*blocks.values())
mixed = [x for row in rounds for x in row if x]
print(mixed)
Output
['a1', 'b1', 'c1', 'a2', 'b2', 'a3']

One item per family per round keeps neighbours apart while other families remain. The largest family ends up at the tail.

In production Hidden-label session builder with a confusion tally

Pythonruns
from collections import Counter
from itertools import zip_longest

POOL = [  # (id, family, cue). The family is the answer key, never shown
    ("q01", "window", "longest contiguous run under a sum limit; values never negative"),
    ("q02", "prefix-sum", "count contiguous runs with a target sum; values may be negative"),
    ("q03", "two-pointer", "sorted array, find a pair that meets a condition"),
    ("q04", "window", "fixed-size block, maximise the total"),
    ("q05", "mono-stack", "for each element, nearest later element that is larger"),
    ("q06", "prefix-sum", "many range-sum queries on a static array"),
    ("q07", "two-pointer", "in-place partition; order of equal items does not matter"),
]

def mixed_session(pool, k, studied):
    by_fam = {}
    for qid, fam, cue in pool:
        if fam in studied:
            by_fam.setdefault(fam, []).append((qid, cue))
    rows = zip_longest(*by_fam.values())  # one item per family per round
    return [x for row in rows for x in row if x][:k]

def same_neighbours(fams):
    return sum(1 for a, b in zip(fams, fams[1:]) if a == b)

def confusion(answers, key):
    return Counter((said, key[q]) for q, said in answers.items() if said != key[q])

key = {qid: fam for qid, fam, _ in POOL}
studied = {"window", "prefix-sum", "two-pointer"}
session = mixed_session(POOL, 6, studied)
print([q for q, _ in session], same_neighbours([key[q] for q, _ in session]))
print(mixed_session(POOL, 6, {"window"}))  # one family: adjacency is unavoidable
print(mixed_session(POOL, 0, studied), mixed_session([], 5, studied), mixed_session(POOL, 5, set()))
print(len(mixed_session(POOL, 99, studied)))  # k above pool size: you get what exists
answers = {"q01": "window", "q02": "window", "q03": "two-pointer", "q04": "prefix-sum"}
print(dict(confusion(answers, key)))
Output
['q01', 'q02', 'q03', 'q04', 'q06', 'q07'] 0
[('q01', 'longest contiguous run under a sum limit; values never negative'), ('q04', 'fixed-size block, maximise the total')]
[] [] []
6
{('window', 'prefix-sum'): 1, ('prefix-sum', 'window'): 1}

q05 is absent because its family was not studied, and no neighbours share a family. A single family still returns items but cannot be mixed. Empty input, k=0 and an empty studied set return [] without crashing. The confusion tally is the useful output: window mistaken for prefix-sum and back names the pair to drill next.

Scenario A

In your world

The situation

You finished two weeks of window and prefix-sum drills and feel fluent. The chapter name was in each file name.

What actually breaks

A mock says "count the contiguous ranges whose sum is a target". You use a variable window, because that is what you practised, and the count is wrong: negative values break the window's monotonic rule. Your drill record shows 20 of 20 correct and says nothing about this.

What you'd do on Monday

Add a family field to the log, strip it from file names, and run mixed_session on Sunday for 10 items. Record every wrong family in the tally, and build next week's drills from the top confused pair.

Scenario B

Imagine you work at Robinhood

14 families, 10-item mixed sets

The numbers

14 families make 14 x 13 / 2 = 91 look-alike pairs. A mixed set is 10 items at 3 minutes each (name family, precondition and cost, no coding) = 30 min, the template's mixed-set slot. Over 4 weeks that is 4 x 10 = 40 answers. Say 9 are wrong, and 6 of them fall on two pairs.

What the Scenario-A answer does here

Random family draws are fine for a first pass. But they treat all 91 pairs alike, and 40 answers cannot cover 91 pairs even once. The two pairs behind 6 of 9 errors get no more attention than pairs you never miss.

What flips at this scale

Weight the next set by the tally: 6 of the 10 items from the two hot pairs (2 pairs x 3 items), 4 from the rest. Rebuild the weights weekly from wrong-family entries.

The trade-off you'd defend

I would defend confusion-weighted sets over uniform ones, trading breadth in a given week for fast repair of the pairs I actually confuse.

Illustrative; 14 families, 10 items, 3 minutes each and the 9 errors are assumed, not Robinhood-published. The pair count 91 is arithmetic.

Blocked vs mixed practice

BlockedMixed, labels hidden
TeachesTemplate executionRecognition and preconditions
FeelsFluent, fastSlower, more errors
HidesWrong-family choiceLittle: errors show
Use whenLearning a familyYou can write the template from memory

Gotchas

Labels leak through file names

Symptom

Mixed accuracy is 100% yet a mock prompt is misclassified.

Cause

The family name leaked through a file name, heading or tag.

Fix

Show only the cue; keep the key in a separate dictionary, as above.

A look-alike pair never drilled

Symptom

The tally shows the same pair three weeks running.

Cause

Uniform sampling spreads attention across 91 pairs.

Fix

Weight by the tally and block-drill that pair.

Tricky questions

The mixed set is 10 of 10. Are you done?
Most people say

Yes, 10 of 10 is mastery.

Actually

Ten correct on cues you have seen means little. Check delayed performance and hard look-alike pairs, and treat it as one signal, not a pass mark.

Scenario question

You're handed a mixed set where you called four of ten prompts "window" and three were not.

Model answer

I'd tally what the three really were, find the precondition separating each from a window, and make those pairs the next set. The trade-off is a narrow week on the pairs that cost me points, with less attention for the rest.

Interview corner

CommonHow do you decide which technique a new problem needs?
“I read the cue, then check the precondition: are values signed, is the input ordered, is the range contiguous. The cue gives candidates and the precondition rejects some.”
TrickWhat's the difference between knowing a template and recognising when to use it?
“Knowing means I can write it with the pattern named. Recognising means I chose it from an unlabeled prompt and can say why the neighbours are wrong. I practise the second separately.”
DesignPlan recognition practice across 14 families.
“I'd block each family first, then run weekly hidden-label sets from studied families, weighted by my confusion tally, and review the tally weekly.”

Memory hook

Parking in an empty lot is not driving on the road: hide the labels and build the road.

If you remember only one thing:

Block to learn the template, mix with labels hidden to learn when it applies.

Self-check

  1. Why hide the family label in a mixed set?

    The interview gives no label; choosing the family is what you practise.

  2. Which families belong in a mixed set?

    Only families already studied.

  3. What does the confusion tally tell you?

    Which pair of families you mistake, so you know what to drill next.

Prove it

Write 6 cue lines for 3 families you studied, in the POOL shape, and run the production block on them. Answer on paper with labels hidden, enter your answers and print the tally. Paste the session ids and the tally. About 30 minutes.

dsa-09-04Card 4 of 6

A self-assessment rubric with evidence

EasyP5 · SkippableKnow it exists7 min
rubricself-assessmentevidencemock-interview

Why you care

"Accepted" says the output matched. It does not say whether you needed a hint, clarified the input or tested edge cases. The job analogy is a green build with no coverage report. Self-assessment also drifts: afterwards you remember understanding what you only learned from the answer. Amazon and Microsoft describe problem solving, coding, testing and communication as parts of the loop (S1, S2). There is no evidence that a total score predicts hiring; do not treat it as readiness.

Explain like I'm 5

A driving test checklist: mirrors, signals, parking, junctions. "You drove fine" is not a result; "failed mirrors, passed the rest" is. Retake in a week to see which items stuck.

Core concept

The rule: score each dimension 0, 1 or 2 on every attempt, and weigh delayed attempts above same-day ones.

  • Six dimensions: contract clarification, pattern and invariant, implementation, complexity, testing, communication.
  • Scale: 0 dependent, 1 prompted, 2 independent.
  • Hints: count them per attempt. Accepted with 3 hints is not independent.
  • Delayed attempt: a repeat at least 7 days after the previous attempt of that problem; 7 is an editable default. Dates must be plain date objects: mixing datetime and date raises TypeError.
  • Unscored is not zero: leave a dimension blank if you did not practise it.

Decision rule: pick the lowest delayed mean to drive the repair in Review the rotation and choose the next repair. Use peer scores for dimensions you cannot see yourself, usually communication and testing. Never turn the total into a readiness number.

Minimal example Same total, different weakness

Pythonruns
DIMS = ["contract", "pattern", "implementation", "complexity", "testing", "communication"]
a = [2, 2, 2, 2, 0, 2]
b = [0, 2, 2, 2, 2, 2]

def weakest(scores):
    return DIMS[min(range(len(DIMS)), key=lambda i: scores[i])]

print(sum(a), sum(b), weakest(a), weakest(b))
Output
10 10 testing contract

Both total 10. One never tested; the other never clarified the input. The total hides which to fix.

In production Rubric aggregator over delayed attempts

Pythonruns
from datetime import date

DIMS = ["contract", "pattern", "implementation", "complexity", "testing", "communication"]
DELAY_DAYS = 7  # delayed = at least this many days after the previous attempt

def check(scores):
    for d, s in zip(DIMS, scores, strict=True):
        if s not in (None, 0, 1, 2):
            raise ValueError(f"{d}: score {s!r} not in 0/1/2/None")

def delayed(attempts):
    prev, out = {}, []
    for a in sorted(attempts, key=lambda a: a[1]):
        if a[0] in prev and (a[1] - prev[a[0]]).days >= DELAY_DAYS:
            out.append(a)
        prev[a[0]] = a[1]
    return out

def summarise(attempts):
    for a in attempts:
        check(a[2])
    rows = delayed(attempts)
    means = {}
    for i, d in enumerate(DIMS):
        vals = [a[2][i] for a in rows if a[2][i] is not None]
        means[d] = sum(vals) / len(vals) if vals else None
    scored = {d: m for d, m in means.items() if m is not None}
    weak = min(scored, key=lambda d: (scored[d], DIMS.index(d))) if scored else None
    return len(rows), weak, sum(a[3] or 0 for a in rows), means

log = [  # (problem, plain date, scores in DIMS order, hints used or None)
    ("p-a", date(2026, 3, 2), [1, 1, 1, 1, 0, 1], 2),
    ("p-a", date(2026, 3, 10), [2, 2, 1, 1, 0, 1], 0),
    ("p-b", date(2026, 3, 3), [2, 1, 1, 1, 1, 1], 1),
    ("p-b", date(2026, 3, 10), [2, 2, 2, 1, 1, 2], None),  # exactly 7 days: counts
    ("p-b", date(2026, 3, 11), [0, 0, 0, 0, 0, 0], 0),  # 1 day after the last: not delayed
    ("p-c", date(2026, 3, 11), [2, 2, 2, 2, None, 2], 0),  # first attempt: not delayed
]
print(*summarise(log))
print(summarise([])[:3], summarise(log[:1])[:3])
try:
    summarise([("p-x", date(2026, 3, 1), [2, 3, 0, 0, 0, 0], 0)])
except ValueError as e:
    print("ValueError:", e)
Output
2 testing 0 {'contract': 2.0, 'pattern': 2.0, 'implementation': 1.5, 'complexity': 1.0, 'testing': 0.5, 'communication': 1.5}
(0, None, 0) (0, None, 0)
ValueError: pattern: score 3 not in 0/1/2/None

p-b on 10 March is exactly 7 days after 3 March, so it counts; its 11 March retry is one day after the previous attempt, so it does not. p-c is a first attempt and is excluded; None hints count as 0. An empty log, or one with only first attempts, yields no weakest dimension instead of an invented one. A score of 3 is rejected loudly.

Scenario A

In your world

The situation

You track "problems solved" in a spreadsheet. It reached 60 and you feel ready.

What actually breaks

In a mock you solve the main problem but never ask about duplicates and never test an empty input; the feedback names both. The sheet shows 60 accepted and has no column for testing or clarification, so the signal was never recorded.

What you'd do on Monday

Add six score columns and a hints column. Enter 0, 1 or 2 within two minutes of finishing. Re-attempt a few problems 7 or more days after the last try and use only those rows to pick your weak dimension. Have a friend score one attempt a week blind, and compare.

Scenario B

Imagine you work at Chargebee

8 engineers, peer mocks for 6 weeks

The numbers

8 engineers each do 1 mock a week as candidate: 8 x 6 = 48 mocks. Candidate and interviewer each score 6 dimensions: 48 x 12 = 576 scores. A mock costs 45 min as candidate and 45 as interviewer: 90 min a week from the 225-min pattern-work pool, leaving 135. Communication sums: self 72 over 48 mocks (mean 1.5), interviewer 48 (mean 1.0); gap 24 / 48 = 0.5.

What the Scenario-A answer does here

Your solo sheet scores your own attempts. The group's problem is the second rater: on communication candidates rate themselves 0.5 above interviewers, on contract clarification the gap is 0. Averaging self-scores alone would send people to repair testing while interviewers mark communication.

What flips at this scale

Record both scores and the gap per dimension. Trust the interviewer where the gap is large and the self-score where it is near zero. Review the gap table weekly instead of totals.

The trade-off you'd defend

I would defend two-rater scoring with gap reporting over self-only scoring, trading 45 minutes a week of interviewer duty for scores not inflated by hindsight.

Illustrative; group size, minutes and score sums are assumptions, not Chargebee-published and not a measured self-assessment bias.

Gotchas

Counting accepted submissions as progress

Symptom

The count climbs while mock feedback stays the same for six weeks.

Cause

Accepted measures output match, not hints, testing or communication.

Fix

Track hints and the six dimensions, as summarise does.

Treating blank as zero

Symptom

The testing mean collapses to 0.25 after a week of untimed learning blocks.

Cause

Unpractised dimensions were entered as 0.

Fix

Use None; the code skips it.

Tricky questions

Solved in 20 minutes with two hints. Score pattern 2?
Most people say

Yes, it is solved and fast.

Actually

Hints mean prompted, so 1 at best. Score what you did unaided and record hints as a number.

Scenario question

You're handed six weeks of rubric rows: testing averages 0.8, communication 1.7, and your accepted count is the highest in your group.

Model answer

I'd ignore the count, take the delayed testing mean as the weakest layer, and spend next week's repair on writing the edge-case list before coding. The trade-off is pausing new problems for a week, accepting a lower count for fixing what an interviewer will actually grade.

Interview corner

CommonHow do you know you are improving?
“I track delayed attempts and hint counts, not just accepted submissions. I score six dimensions from 0 to 2, so I can see which one moves.”
TrickYou solved it, so why score yourself 1 on testing?
“I solved it, but I never wrote expected outputs before running. I score what I did unaided, not what the judge accepted.”
DesignDesign a rubric for a peer mock group.
“I'd use six dimensions on a 0-2 scale, with candidate and interviewer scoring separately and the gap reported per dimension. I wouldn't publish a total, because it hides which dimension failed.”

Memory hook

A driving test checklist, retaken a week later: failed mirrors, passed the rest.

If you remember only one thing:

Score six dimensions separately and trust the delayed ones; never read a total as readiness.

Self-check

  1. What do 0, 1 and 2 mean?

    0 dependent, 1 prompted, 2 independent.

  2. Why prefer delayed attempts?

    They show what stuck after a gap, not what you remembered the same day.

  3. Is a blank dimension a zero?

    No; it is unscored and skipped.

Prove it

Copy the production block, enter your last 5 real attempts (two repeated at least 7 days apart), and print summarise(log). Paste the weakest dimension and the means. Then have one person score one attempt blind and paste both score lists. About 30 minutes.

dsa-09-05Card 5 of 6

Log a solved problem so learning compounds

EasyP5 · SkippableKnow it exists7 min
logtaggingpattern-firstnotes

Why you care

A log you cannot query is a diary. The job version is a pipeline that writes millions of lines and no audit table: when something is wrong, you read lines by hand. A solved-problem log compounds only if rows can be filtered by pattern, failed assumption and next recall date. Interviewers never see it; they see that you stop repeating mistakes. If your first failed assumption keeps being "assumed sorted input", a tagged log shows it in week 2.

Explain like I'm 5

A mechanic's service book. Each visit lists the car, the part, the fault and the next service date. You do not copy the repair manual in; you note which page you used.

Core concept

The rule: one row per attempt, tagged by pattern first, with pointers instead of content.

  • Fields: date, external problem link, existing-book anchor if one exists, pattern card IDs, first failed assumption, help used, invariant summary, time/space argument, missed tests, rubric scores, next recall date.
  • Pattern-first tagging: tag with card IDs such as dsa-04-02, not problem titles or site topics, so you find rows by the technique to recall.
  • No solution code or worked trace: link out. Copied solutions turn the log into something you re-read.
  • First failed assumption: the most useful field; use a short controlled vocabulary so you can count it.
  • Same link twice: another row with the same link and a later date; A self-assessment rubric with evidence needs those dated attempts.

Decision rule: jot the failed assumption and help used on the day, while fresh; complete and tag the row in the Saturday log block. If a field is hard to fill, write unknown and fix it at the next recall; never skip the row.

Minimal example Which fields are missing?

Pythonruns
REQUIRED = ["date", "link", "patterns", "first_failed_assumption", "help",
            "invariant", "cost", "missed_tests", "rubric", "next_recall"]
row = {"date": "2026-03-02", "link": "https://example.com/p/1", "patterns": ["dsa-04-02"]}
missing = [f for f in REQUIRED if f not in row]
print(len(missing), missing)
Output
7 ['first_failed_assumption', 'help', 'invariant', 'cost', 'missed_tests', 'rubric', 'next_recall']

Seven of ten fields are absent. A row in this state is rejected, not filed.

In production Log validator over JSON lines

Pythonruns
import json, re
from datetime import date
REQUIRED = ["date", "link", "patterns", "first_failed_assumption", "help",
            "invariant", "cost", "missed_tests", "rubric", "next_recall"]
TEXT = ("first_failed_assumption", "help", "invariant", "cost", "missed_tests")
CODE_HINTS = ("def ", "return ", "lambda ", "\n")  # crude: a row is notes, not a solution
def problems(row, seen):  # seen: link -> date of the latest attempt
    if not isinstance(row, dict):
        return ["row must be a JSON object"]
    out = [f"missing {f}" for f in REQUIRED if row.get(f) in (None, "", [])]
    link = str(row.get("link") or "")
    if any(h in str(row.get(f) or "") for f in TEXT for h in CODE_HINTS):
        out.append("a text field looks like code")
    pats, rub = row.get("patterns") or [], row.get("rubric") or []
    if not isinstance(pats, list) or not all(re.fullmatch(r"dsa-\d\d-\d\d", str(p)) for p in pats):
        out.append("patterns must be a list of ids like dsa-04-02")
    if not isinstance(rub, list) or (rub and len(rub) != 6) or any(s not in (None, 0, 1, 2) for s in rub):
        out.append("rubric must be 6 values from 0/1/2/None")
    try:
        day, nxt = (date.fromisoformat(row[k]) for k in ("date", "next_recall"))
        if nxt <= day:
            out.append("next_recall must be after date")
        if link in seen and day <= seen[link]:
            out.append("repeat attempt must be dated after the last one")
        seen[link] = day
    except (KeyError, ValueError, TypeError) as e:
        out.append(f"bad date: {type(e).__name__}")
    return out
GOOD = {"date": "2026-03-02", "link": "https://example.com/p/1", "patterns": ["dsa-04-02"],
        "first_failed_assumption": "assumed sorted input", "help": "none",
        "invariant": "left side holds only valid candidates", "cost": "O(n) time, O(1) space",
        "missed_tests": "empty input", "rubric": [2, 1, 2, 1, 0, 1], "next_recall": "2026-03-03"}
row = lambda **kw: json.dumps(dict(GOOD, **kw))
u = "https://example.com/p/"
lines = [json.dumps(GOOD), row(invariant="", help=None), row(link=u + "2", help="def f(x):\n  return x"),
         row(link=u + "3", next_recall="2026-02-30"), "{not json", "null", "[1]",
         row(link=u + "4", patterns=5, rubric=[9, 9, 9]), row(link=u + "5", rubric="lol"),
         row(date="2026-03-10", next_recall="2026-03-11"), row(date="2026-03-10", next_recall="2026-03-11")]
seen = {}
for n, line in enumerate(lines, 1):
    try:
        print(n, problems(json.loads(line), seen) or "ok")
    except json.JSONDecodeError as e:
        print(n, "JSONDecodeError:", e.msg)
Output
1 ok
2 ['missing help', 'missing invariant', 'repeat attempt must be dated after the last one']
3 ['a text field looks like code']
4 ['bad date: ValueError']
5 JSONDecodeError: Expecting property name enclosed in double quotes
6 ['row must be a JSON object']
7 ['row must be a JSON object']
8 ['patterns must be a list of ids like dsa-04-02', 'rubric must be 6 values from 0/1/2/None']
9 ['rubric must be 6 values from 0/1/2/None']
10 ok
11 ['repeat attempt must be dated after the last one']

Each bad row fails differently. Row 4 has 2026-02-30, which does not exist. null, [1], patterns=5 and rubric="lol" are reported, not crashed on; that holds for the shapes tested here, not every input. Row 10 repeats row 1's link a week later and is fine; row 11 repeats it on the same date and is flagged. The code check is a crude nudge.

Scenario A

In your world

The situation

Your notes live in one text file with lines like "did the window one, was hard". There are 80 lines.

What actually breaks

Before a mock you want every attempt where you assumed sorted input. The file has no such field; you scroll for 20 minutes and miss four. Two entries are pasted full solutions that you re-read and call "review".

What you'd do on Monday

Switch to log.jsonl with the fields above. Tag by card id, restrict the failed assumption to a short list you maintain (sorted, duplicates, negatives, empty, bounds, mutation), and run the validator before saving. Replace any pasted solution with a link.

Scenario B

Imagine you work at Lenskart

156 rows a year, one person

The numbers

3 logged attempts a week x 52 = 156 rows a year. At 5 minutes each that is 15 min a week, the Saturday log block; 156 x 5 = 780 min = 13 h a year. Reading every row at 20 seconds takes 156 x 20 = 3,120 s, about 52 min, each time you want one theme.

What the Scenario-A answer does here

A text note works at 15 rows. At 156 rows of free text nobody can count: "forgot to sort", "assumed sorted" and "didn't consider order" are three phrases for one cause, and each count looks small.

What flips at this scale

A controlled vocabulary of about 8 failure tags plus free text, and pattern ids on every row. A one-line script then counts rows per tag and per pattern. Illustratively, if 3 of 8 tags hold 90 of 156 rows (58%), the next repair is obvious. The log becomes a query, not a reading task.

The trade-off you'd defend

I would defend a small controlled vocabulary plus a free-text note over free text alone, trading a few seconds choosing a tag for counts I can act on.

Illustrative; the rate, minutes per entry and the 90-of-156 split are assumptions, not Lenskart-published.

Gotchas

Saving solution code in the log

Symptom

Review sessions become re-reading, and you pass recall checks you would fail blind.

Cause

The row held the answer, so retrieval was replaced by reading.

Fix

Store a link and a one-line invariant. The validator flags def and newlines in text fields.

Impossible recall date

Symptom

A row has next_recall of 2026-02-30 and the review queue silently drops it.

Cause

No date validation at write time.

Fix

Validate on save, as the production block does.

Tricky questions

Log the solution so you can review it fast?
Most people say

Yes, saving review time is the point.

Actually

Fast review by reading is the failure mode. Log the invariant in one line; if you cannot recall the rest, that is the signal.

Scenario question

You're handed a 200-line notes file of free-text entries and asked for the five most repeated mistakes.

Model answer

I'd read a sample of 30 lines, derive eight tags, and add a tag field to every new entry rather than relabel everything. The trade-off is partial counts for a month, which I accept over spending a weekend re-tagging notes I may never open.

Interview corner

CommonHow do you learn from mistakes in practice?
“I log the first assumption that failed and tag it from a short list. After a month I count the tags, and the largest becomes my next repair.”
TrickWhy not paste your solution into your notes?
“Because I'd re-read it and call that review. I store the link, the invariant in one line and the cost, so recall has to come from me.”
Experience checkHave you built an audit trail for a pipeline?
“Yes, I built an audit table with run ID, row counts and failure reason, so we could answer questions without reading logs. My practice log is the same shape.”

Memory hook

A mechanic's service book: car, fault, next service date, and a page number instead of the manual.

If you remember only one thing:

Tag by pattern id and failed assumption, store pointers, never solutions.

Self-check

  1. What goes in place of solution code?

    The problem link, an existing-book anchor if present, and a one-line invariant.

  2. Why tag with pattern IDs?

    So you find rows by the technique you need to recall.

  3. How is a repeated problem logged?

    As another row with the same link and a later date.

Prove it

Write 5 real log rows as JSON lines with the production block's fields, run the validator, and fix every problem it reports. Paste the final run where every row shows ok. Then count your rows per failed-assumption tag in three lines of Python and paste that too. About 35 minutes.

dsa-09-06Card 6 of 6

Review the rotation and choose the next repair

MediumP5 · SkippableKnow it exists7 min
weekly-reviewdiagnosisrepairmock-interview

Why you care

Without a weekly review you drift: you do what you like and the weak layer stays weak. The job version is a retrospective that lists tasks and never asks what failed. Interviewers see the unrepaired layer: someone who knows the pattern but does not recognise it, or ships untested code. Each needs a different fix. This card picks one repair a week.

Explain like I'm 5

A car that will not start. You check battery, then fuel, then spark, because a dead battery explains everything after it. You do not rebuild the engine when the battery was flat.

Core concept

The rule: once a week, run an unaided recognition and cost check, take one timed attempt, classify each failed attempt by its earliest failing layer, then repair the layer that fails most often (earliest on a tie).

  • Four layers: knowledge (cannot state the pattern), recognition (knows it, does not choose it), coding (chooses it, cannot finish in the limit), testing (finishes, misses cases).
  • One repair block: pick the most frequent layer; ties go to the earliest.
  • Carry forward: planned families you did not touch move to the next week or rotation.
  • Mocks: treat them as extra timed attempts, after checking the employer's current format, which varies by role.
  • No mastery by count: when the rotation ends, repeat it.

Decision rule: a week with no failures keeps the rotation moving; a week with no attempts starts with the recall check. If time is short, shorten repair before dropping the review queue.

Minimal example First failing layer

Pythonruns
ORDER = ["knowledge", "recognition", "coding", "testing"]

def failure(known, recognised, coded, tested):
    for name, ok in zip(ORDER, (known, recognised, coded, tested)):
        if not ok:
            return name  # the earliest failure explains the later ones
    return "none"

print(failure(False, False, False, False), failure(True, False, True, True))
print(failure(True, True, True, False), failure(True, True, True, True))
Output
knowledge recognition
testing none

Failing everything reports only knowledge. The second call is a recognition failure although coding and testing passed.

In production Weekly review with carry-over

Pythonruns
from collections import Counter

ORDER = ["knowledge", "recognition", "coding", "testing"]
REPAIR = {  # editable defaults: one repair block per layer
    "knowledge": "re-read the pattern card, then redo its minimal example from memory",
    "recognition": "run a hidden-label mixed set on the two families you confused",
    "coding": "re-implement the template untimed, then once under the limit",
    "testing": "write the edge-case list before coding, then dry-run it on paper",
}

def classify(a):
    if not a["known"]:
        return "knowledge"
    if not a["recognised"]:
        return "recognition"
    if a["solved_in"] is None or a["solved_in"] > a["limit"]:  # exactly on the limit passes
        return "coding"
    return "testing" if not a["tested"] else "none"

def review(planned, attempts):
    carried = sorted(set(planned) - {a["family"] for a in attempts})
    counts = Counter(classify(a) for a in attempts)
    counts.pop("none", None)
    if not attempts:
        return {"repair": "no attempts: run the recall check before choosing", "carried": carried}
    if not counts:
        return {"repair": "none: keep the rotation moving", "carried": carried}
    top = max(counts.values())
    kind = next(k for k in ORDER if counts.get(k) == top)  # tie: earliest layer wins
    return {"failures": dict(counts), "repair": f"{kind}: {REPAIR[kind]}", "carried": carried}

def row(family, known, rec, solved_in, tested, limit=45):
    return dict(family=family, known=known, recognised=rec, solved_in=solved_in,
                tested=tested, limit=limit)

planned = ["heap", "selection", "mono-stack"]
week = [row("heap", True, True, 45, True), row("selection", True, False, None, False)]
print(review(planned, week))
print(review(planned, [row("heap", True, True, 46, True), row("selection", True, True, 30, False)]))
print(review(planned, [row("heap", True, True, 30, True)]))
print(review(planned, []))
mixed = [row("heap", False, False, None, False)] + [row("selection", True, True, 99, True)] * 5
print(review(planned, mixed)["repair"])
Output
{'failures': {'recognition': 1}, 'repair': 'recognition: run a hidden-label mixed set on the two families you confused', 'carried': ['mono-stack']}
{'failures': {'coding': 1, 'testing': 1}, 'repair': 'coding: re-implement the template untimed, then once under the limit', 'carried': ['mono-stack']}
{'repair': 'none: keep the rotation moving', 'carried': ['mono-stack', 'selection']}
{'repair': 'no attempts: run the recall check before choosing', 'carried': ['heap', 'mono-stack', 'selection']}
coding: re-implement the template untimed, then once under the limit

In the first case a solve at exactly 45 against a limit of 45 passes (the boundary), and the second attempt fails at recognition. In the second case 46 against 45 is a coding failure, it ties with a testing failure, and the earlier layer wins. Cases three and four are a clean week and an empty one. The last line has 1 knowledge and 5 coding failures: the frequency rule picks coding.

Scenario A

In your world

The situation

Your Sunday ritual is "do whatever looks interesting". The last timed attempt was three weeks ago.

What actually breaks

A mock goes wrong: you recognised the pattern but ran out of time writing it. You spend a week on recognition drills, which you enjoy, and the next mock fails the same way. Your log had two earlier "ran out of time" notes; nobody counted them.

What you'd do on Monday

Every Sunday spend 20 minutes of the 60-minute repair block on log.jsonl, so 540 is not exceeded: classify last week's attempts into the four layers, run review(planned, attempts), and make the printed repair the first item of next week. Move carried families into the plan.

Scenario B

Imagine you work at Duolingo

6-week rotation, 2 lost Saturdays

The numbers

The plan is 6 x 540 = 3,240 min and 6 timed attempts. Weeks 3 and 4 each lose a Saturday (120 min: timed attempt 45, log 15, repair 60). Actual: 3,240 - 240 = 3,000 min and 4 of 6 timed attempts. Catching up by adding 240 min to weeks 5 and 6 is +120 each: 660 against 540, 22% over.

What the Scenario-A answer does here

The weekly review still works for the four weeks that happened. Cramming does not: 660-minute weeks exceed the floor you chose because you could keep to it, and the next Saturday is lost too. The week 3-4 families get one rushed pass.

What flips at this scale

Carry, do not catch up. Mark the week 3-4 families as carried, give them the first slots of the next pass, and keep weeks 5-6 at 540. A rotation is repeatable, so a carried family is delayed, not lost. Cut new attempts first.

The trade-off you'd defend

I would defend carrying unfinished families into the next pass over cramming them into the last two weeks, trading a later finish for weeks I can actually keep.

Illustrative; the lost Saturdays are assumed, not Duolingo-published. The minute totals follow from the template in dsa-09-01.

Gotchas

Repairing the layer you enjoy

Symptom

Three weeks of recognition drills while every mock ends with unfinished code.

Cause

The repair was chosen by preference, not by classifying failures.

Fix

Run review on the week's attempts and take the repair it prints.

Calling a week-6 finish "done"

Symptom

Week 7 starts and you can no longer state the week 1 invariants.

Cause

The rotation was treated as a finish line.

Fix

Repeat it, and keep the weekly recall check from Spaced recall with adjustable intervals.

Tricky questions

Four of your last six attempts failed. Do you rest?
Most people say

Yes, the plan is not working; take a week off.

Actually

Classify first. If all four are testing failures, one cheap repair (edge-case list before coding) fixes them. Stopping loses the data.

Scenario question

You're handed four weeks of attempts: 3 recognition failures, 3 testing failures, 1 coding failure, and 9 hours in the week ahead.

Model answer

I'd pick recognition. It ties with testing at 3 but sits earlier in the chain, so fixing it may remove downstream failures. One repair block on a hidden-label mixed set, then a timed attempt. The trade-off is that testing waits a week, which I accept to fix the layer the others depend on.

Interview corner

CommonHow do you decide what to practise next?
“I classify each failed attempt as knowledge, recognition, coding or testing by its earliest failing layer, and fix the layer that fails most, earliest on a tie, because later failures often trace back to an earlier layer.”
TrickYou failed a mock by running out of time. What do you change?
“I'd first check whether the clock was the cause or I picked the wrong approach. If I chose right and wrote it slowly, I re-implement the template untimed and then timed.”
DesignPlan the weeks after a six-week rotation.
“I'd repeat the rotation, put carried families in the first slots, keep the weekly recall check, and recheck the employer's format before mocks. I wouldn't declare mastery by problem count.”

Memory hook

A car that will not start: battery first, then fuel, then spark; don't rebuild the engine.

If you remember only one thing:

Each week fix the layer that fails most (earliest on a tie), and repeat the rotation instead of declaring it done.

Self-check

  1. What are the four failure layers?

    Knowledge, recognition, coding and testing.

  2. Which layer do you repair on a tie?

    The earliest one.

  3. What happens to families you skipped?

    They are carried into the next week or rotation pass.

Prove it

Take your last 5 real attempts, fill them into the row(...) shape, plan three families, and run review(planned, attempts). Paste the printed repair and carried list, then do the repair block (at most 60 minutes) and paste the log row you write for it. About 60 minutes.