The search that never stops.
transcript
One build. It passes. The search should say none. It runs for ever instead. A single build is the smallest test. Why does it fail?
The window holds build zero. The middle is build zero. It passes, so the bug sets lo to mid. A window of one build has its middle on that build. Mid is zero. Lo stays zero. Nothing shrank. The loop repeats.
The bug keeps mid in the window. But mid passed, so it is ruled out. Move lo past it, to mid plus one. Now the window always shrinks.
Every step must shrink the window. A passing build is ruled out. So lo moves past it. A failing build may be the first. So hi moves to it, and no further.
Tiny inputs find this bug at once. Try an empty list. Try one build. If a run never ends, check the moves. Then check that every step shrinks the window.
Set lo to mid plus one. Full breakdown in the lecture.