Phase 5Days 22-27

Binary Search — on arrays & on the answer

Halving the search space, and the far more powerful binary-search-on-the-answer

Phase Goal

Master exact search and, crucially, recognizing the monotonic predicate that unlocks answer-search.

Progress

Day 22: Binary search on a sorted array

Day 23: Binary search on tricky arrays

Day 24: Binary search on the answer — part 1

Day 25: Binary search on the answer — part 2 (allocation)

Day 26: Binary search on 2D matrices

Day 27: The two-sorted-arrays finale

Phase Complete!

After this phase, you'll be able to:

  • Binary search on a sorted array
  • Binary search on tricky arrays
  • Binary search on the answer — part 1
  • Binary search on the answer — part 2 (allocation)
  • Binary search on 2D matrices
  • The two-sorted-arrays finale

After Phase 5, explain a core invariant, reconstruct a solution after a delay, diagnose a bug, and solve one unlabelled variation. Repair a failed prerequisite before advancing; record help separately from independent work.