Day 29 — Mixed practice: Linked List

mock day · linked-list mix · timed

Tonight's goal: choose the pattern under pressure, say the approach and complexity out loud, then code one normal linked-list problem plus Reorder List, which counts double.

Tonight's protocol

Use the mock / mixed day protocol: talk first, code second, compare after the timer.

  1. 0:00-0:04: answer the warm-up MCQs below. Do not open solution notes.
  2. 0:04-0:05: choose one normal problem from the menu, then add Reorder List. That is two actual problems, three scored slots.
  3. 0:05-0:07: for the normal problem, say the pattern name, brute force, better approach, and time/space complexity before typing.
  4. 0:07-0:22: solve the normal problem. If stuck at minute 12, read only the pattern name and use the final 3 minutes.
  5. 0:22-0:24: reset the editor, breathe, and state the three Reorder List moves out loud.
  6. 0:24-0:54: solve Reorder List. If stuck at minute 25, read only the pattern name and use the final 5 minutes.
  7. 0:54-1:04: compare, encode one reasoning gap per miss, and stop. Do not keep patching silently.

The problem menu

Pick one normal problem, then always attempt Reorder List. Explain aloud before code for every row you attempt.

ProblemPattern nameTimer
Linked List Cycle fast/slow pointers 15 minutes
Remove Nth Node From End of List gap pointers 15 minutes
Reorder List linked-list composition 30 minutes; counts double

Warm-up MCQs

1. Which invariant protects reversal?

2. Where does dummy-node trick help?

3. Spot the Floyd bug: while fast: fast = fast.next.next

4. When leader reaches the end, trailer is where?

5. Which order matches Reorder List?

6. What does old_to_new map preserve?

Self-check gate

Pass tonight if all three are true

If any gate fails, write WA: <broken invariant or pointer mistake> in the tracker and add that failed problem to the next revision day. If Reorder List fails, it goes into revision even if the normal problem passed.