Mental Model
A peak element is one that is bigger than its neighbors. We use binary search to quickly find such a peak by checking the middle and deciding which side to search next.
Analogy: Imagine walking on hills and valleys. If you stand somewhere and see the slope going up on one side, you know a peak must be in that direction. You keep moving halfway towards that side until you find the top.
Array: [1, 3, 2, 5, 4] Indexes: 0 1 2 3 4 Initial search range: start -> 0 end -> 4 Middle points to index 2 (value 2) Neighbors: 3 (left), 5 (right)