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 side to search next.
Analogy: Imagine hiking on a mountain trail where you want to find a peak. You stand in the middle and look around. If the slope goes up to the right, you walk right; if it goes up to the left, you walk left. Eventually, you reach a peak where the ground is higher than both sides.
Index: 0 1 2 3 4 5 6
Value: 1 -> 3 -> 20 -> 4 -> 1 -> 0 -> 5
↑
mid pointer