Every walk uphill ends on a peak.
transcript
A list with no sorted run. Binary search needs a sorted list, or does it? Can you still binary search it? Yes. Walk uphill.
Heights along a cycling route. A peak beats both neighbours. There are three here. One is enough.
Look at the middle and the next one. If it climbs, a peak lies after the middle. If it falls, the middle may be a peak.
The middle is slot three. The next is lower. Slot one is higher than slot two. Slot zero is lower than slot one. Slot one is a peak.
The window always climbs into its left end. Its right end beats the next one, or is the last. So the highest value inside is a peak.
Equal neighbours break the rule. Take one, two, two, three. The search stops at slot one. Slot one is not a peak. Slot three is.
It finds a peak, not the highest. And it needs neighbours that differ. Full breakdown in the lecture.