Tonight's goal is one strict weak-topic DSA mock, then one URL Shortener redraw: base62 write path, cached read path, spoken clearly.
Tonight's protocol
0:00-0:02: choose exactly two weak DSA problems from the menu below. Use only this menu.
0:02-0:05: answer the warm-up MCQs. When the five-minute box ends, solving starts.
0:05: start one strict 60-minute DSA timer using the mock-day protocol: timer first, talk first, code second.
0:05-0:35: solve Problem 1. First two minutes: say the pattern name, brute force, better approach, time, and space aloud. If stuck at minute 25, read only the pattern name and use the final five minutes.
0:35-1:05: solve Problem 2 with the same spoken checkpoint and stuck rule. Stop when the DSA timer ends.
1:05-1:08: from memory, redraw the URL Shortener boxes: client, load balancer, write API, ID service, redirect API, cache, database, analytics queue.
1:08-1:15: explain the design aloud: POST /links issues an ID, base62-encodes it, saves the mapping, and returns the short code; GET /code checks cache first, falls back to the database, fills cache, then redirects.
1:15-1:20: open the compare diagram below, mark what your redraw missed, and write one root-cause line.
1:20-1:25: score the self-check gate. Failed DSA problems go to the next revision list.
The problem menu
Pick exactly two. For each chosen problem, explain aloud before typing, then attempt without solution text.
“Under a strict timer, state your approach and its complexity out loud before you write a line of code — the talking is the skill being tested.”
2. What makes a weak problem count as revised?
“Re-solve your weakest problems from a blank file with no hints; a problem only counts as revised when it compiles and passes on the first or second run.”
3. Redirect traffic dwarfs create traffic. What should be protected first?
“A tiny write path (issue an ID, base62-encode it) feeding an enormous read path — design for the reads: one lookup per redirect, cache the hot links.”
4. Which write path matches URL Shortener?
“A tiny write path (issue an ID, base62-encode it) feeding an enormous read path — design for the reads: one lookup per redirect, cache the hot links.”
5. Spot the redirect-path bug: the database is checked before cache.
“A tiny write path (issue an ID, base62-encode it) feeding an enormous read path — design for the reads: one lookup per redirect, cache the hot links.”
6. What path gets most URL Shortener design attention?
“A tiny write path (issue an ID, base62-encode it) feeding an enormous read path — design for the reads: one lookup per redirect, cache the hot links.”
Self-check gate
Pass bar
Pass tonight if you scored at least 1.5 out of 2 on DSA, explained approach plus complexity before both attempts, and your URL Shortener redraw included ID service, base62 code, mapping database, cache-before-database read path, and async analytics.
Score each DSA problem: 1 for accepted inside its slot, 0.5 for the right invariant with unfinished code, 0 for the wrong direction. If you score below 1.5, add each failed problem to the next revision list with WA: <missed invariant or implementation bug>.
If the system-design redraw misses base62 writes or cached reads, add URL Shortener: redraw write/read paths to the next session's first five minutes.