Day 87 — Mock: DSA + System Design V

~120 minutes · mock day · trees + notification system

Goal: run a strict 60-minute tree mock, then design a notification system from a blank page using the seven-step system-design script.

Tonight's protocol

Use the mock-day protocol: strict timer, talk out loud, approach and complexity before code, compare only after the timer.

  1. 0:00-0:04 — Warm up. Answer the MCQs below fast. No notes, no lesson tabs.
  2. 0:04-0:05 — Set the room. Open a blank file and the first LeetCode prompt. Start solving by minute 5.
  3. 0:05-0:35 — DSA Problem 1. First say the pattern, brute force, better approach, and time/space. If stuck after 25 minutes, reread only the pattern name.
  4. 0:35-1:05 — DSA Problem 2. Same rules: explain aloud first, then code. Keep the timer honest.
  5. 1:05-1:10 — DSA compare note. Write one line per miss: wrong invariant, missed edge case, implementation bug, or unclear complexity.
  6. 1:10-1:55 — Notification system design. Use exactly this timing: requirements 5, scale 5, API 5, data model 5, boxes 10, bottleneck 10, failures 5.
  7. 1:55-2:00 — Gate. Score the session using the self-check below. Failed items go to the next revision queue.

The problem menu

BlockPromptPattern nameTimer
DSA 1 Binary Tree Level Order Traversal BFS levels: queue-length snapshot 30 min
DSA 2 Lowest Common Ancestor of a Binary Tree Tree recursion: split target returns 30 min
Design Design a notification system from scratch: email, SMS, and push delivery for users. Seven-step script: requirements → scale → API → data model → boxes → bottleneck → failures 45 min

For the design block, do not hunt for a lesson. The test is whether the script can create the first reasonable design.

Warm-up MCQs

1. Which invariant identifies inorder traversal?

2. What should height-piggyback DFS return?

3. Which move keeps BFS levels separate?

4. Which signal makes the current node LCA?

5. Which invariant preserves serialized tree shape?

6. During a data partition, what choice appears?

Self-check gate

Pass tonight if both DSA problems had a spoken invariant and complexity before code, the BFS answer used a queue-length snapshot, the LCA answer combined left and right returns correctly, and the notification design has all seven headings filled.

Failure path: add the failed DSA problem to the next tree revision and run it from a blank file using the revision protocol. If the design missed boxes, bottleneck, or failures, add "notification system" to the next design review and redo the seven headings before another mock.