Mental Model
A peak element is one that is bigger than its neighbors. We use binary search to quickly find such an element by checking the middle and deciding which half to explore next.
Analogy: Imagine climbing a mountain range where you want to find a peak. Instead of walking the whole range, you look at the middle point. If the slope goes up to the right, you move right; if it goes up to the left, you move left. This way, you quickly find a peak without checking every step.
Index: 0 1 2 3 4 5 6
Value: 1 -> 3 -> 2 -> 5 -> 4 -> 6 -> 3
↑
mid pointer