mock day · 60 minutes · arrays, strings, stack, linked list · Python
Tonight's goal: run a realistic Month 1 mock under a strict timer: one easy, two medium, talk aloud, no autocomplete, and score solved / time / bugs / clarity.
Tonight's protocol
Use the mock-day protocol: timer first, approach and complexity out loud, code second, compare after.
0:00-0:03 — Warm up: answer the six MCQs below in one pass. If you miss one, read only its invariant quote and keep moving.
0:03-0:05 — Setup: open one blank file and the LeetCode tabs. Turn autocomplete off. Do not open notes, hints, saved code, videos, or solution text.
0:05-0:17 — Problem 1: solve the required easy array problem. Before typing, say the pattern, brute force, better approach, time, and space out loud.
0:17-0:37 — Problem 2: solve one medium from the menu. If stuck at minute 12 of the slot, reread only the pattern name, then restart your explanation.
0:37-0:57 — Problem 3: solve one different medium from the menu. Same rule: explain aloud first, no solution text during the timer.
0:57-1:00 — Score: stop coding. For each problem, write solved / time / bugs / clarity. Compare only after the score is written.
The problem menu
Run exactly three scored problems: the required easy row, then choose two different medium rows. The menu spans arrays, strings/sliding window, stack, and linked list; do not solve all four tonight.
Score line format: Problem — solved yes/no — time — bugs — clarity 1-3.
Warm-up MCQs
1. Which invariant fits Two Sum while scanning?
Invariant: “Hashing: trade O(n) space to make ‘have I seen X?’ an O(1) question.”
2. A pivot check re-adds both sides every loop. What should replace it?
Invariant: “Precompute a running total once, then answer any range or split in O(1).”
3. A sliding-window answer records best before removing a duplicate. What broke?
Invariant: “Grow the window on the right greedily; shrink from the left only until it is valid again. Here valid = no repeated character.”
4. Daily Temperatures sees a warmer day. What does it prove for popped indices?
Invariant: “Keep the stack sorted; when a new element breaks the order, everything you pop just found its next-greater/next-warmer answer. Each index is pushed and popped once, so O(n).”
5. During linked-list reversal, why save nxt first?
Invariant: “Reversal is re-aiming one arrow per step; save next before you break the link so you don't lose the rest.”
6. Reorder List feels large. Which composition matches the lesson?
Invariant: “Hard problems are compositions: find the middle, reverse the second half, then merge the two halves alternately.”
Self-check gate
Pass tonight only if all four are true
You started the first LeetCode attempt by minute 5.
You attempted exactly one easy and two medium problems inside 60 minutes.
Before each attempt, you said the pattern, brute force, better approach, time, and space aloud.
Your score line names solved yes/no, final time, concrete bug count, and clarity from 1 to 3.
Failure path: add every failed or unclear problem to the next revision list with WA: <root cause>. Re-solve it later from a blank file with no hints.