Pattern practice system
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
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)['ch-07', 'ch-08', 'ch-09']
540 1080Six 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
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)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 availableThe 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.
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.
Imagine you work at Notion
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
The calendar says six weeks, six chapters. In week 6 you find ch-07, ch-08 and ch-09 were never scheduled.
Nine chapters mapped onto six slots drop three, and the cross-cutting chapters were treated as optional.
Run missing(ROTATION) after any edit; it must return []. Keep the every-week set.
Timed practice from day one
Every attempt ends at the limit with half a solution and no insight into why.
The clock was applied while you were still learning the invariant.
Untimed first, then one timed attempt a week on an unseen problem.
Tricky questions
Three more new problems, since new problems move you forward.
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?
TrickHow many problems have you solved?
DesignDesign a practice plan for someone with 9 hours a week.
Memory hook
A gym with a logbook: a split you repeat, warm-ups every session, every lift written down.
Budget the hours first, and when a week is short cut new problems, never the review or the log.
Self-check
What is the minimum weekly time budget here?
540 minutes: five 60-minute weekdays and two 120-minute weekend days.
Why does a one-chapter-per-week plan fail?
Six weeks cover six chapters; ch-07, ch-08 and ch-09 are never scheduled.
When do you use timed practice?
Once a week on an unseen problem; learning an invariant is untimed.
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.