Day 07 — Mixed practice + mock review: Arrays

Mock day · arrays · start solving within 5 minutes

Tonight's goal: choose a direction under pressure, say the pattern and complexity out loud, then code honestly under a timer.

Tonight's protocol

Use the mock-day process: speak first, code second, compare after.

  1. 0:00-0:03 — Warm up: answer the six MCQs below. Do not study; just retrieve.
  2. 0:03-0:05 — Choose the set: pick any 3 problems from the Day 1-5 menu. Include at least one problem that feels uncomfortable.
  3. 0:05-0:50 — Timed set: spend 10-15 minutes per problem. Before typing, say the pattern guess, brute force, better approach, and time/space complexity out loud.
  4. During each timer: code without solution text. If stuck at minute 10, read only the pattern name in the menu, then keep trying until minute 15.
  5. 0:50-1:00 — Compare: for each miss, open the linked source lesson or solution and write one reasoning gap: invariant, edge case, or implementation bug.
  6. 1:00-1:25 — Mock review: choose 1 easy problem and 1 medium problem from the same menu. Explain your approach out loud before coding: 10 minutes for easy, 15 minutes for medium.
  7. 1:25-1:30 — Gate: apply the self-check below and put any failed problem into the next revision queue.

The problem menu

For the timed set, pick any 3. For mock review, pick one easy and one medium; the medium choices here are Maximum Subarray and Product of Array Except Self.

LevelProblemPattern name
EasyTwo SumHashing / seen question
EasyContains DuplicateHashing / seen question
EasyValid AnagramHashing
EasyBest Time to Buy and Sell StockGreedy min-tracking
MediumMaximum SubarrayKadane's algorithm
MediumProduct of Array Except SelfPrefix × suffix products
EasyMove ZeroesTwo pointers, same direction
EasyRemove Duplicates from Sorted ArrayTwo pointers, same direction
EasyMerge Sorted ArrayTwo pointers, converging
EasyMajority ElementBoyer-Moore majority vote
EasyMissing NumberXOR cancellation
EasyFind Pivot IndexPrefix sums
EasyRange Sum Query - ImmutablePrefix sums

Warm-up MCQs

1. Two Sum asks for a missing partner while scanning. Which invariant applies?

2. Stock profit: which fact must the scan keep so today's sell is easy?

3. Maximum Subarray: what should happen when the carried sum turns negative?

4. Product Except Self: what builds one answer cell without division?

5. Move Zeroes: which pointer story proves the pass is linear?

6. Find Pivot Index: what makes each split check O(1)?

Self-check gate

Pass tonight only if all four are true.
  1. You started the first timed problem by minute 5.
  2. For every attempt, you said the pattern, brute force, better approach, and complexity before coding.
  3. At least 2 of the 3 timed-set problems reached runnable code inside 15 minutes each.
  4. The mock review included 1 easy and 1 medium problem, each explained out loud before coding.

Failure path: write WA: <root cause> for each failed problem, add it to the next revision queue, and re-solve it later from a blank file with no hints.