Mental Model
We look for a number in a list that was sorted but then turned around at some point. We use a smart search that checks which part is still sorted to find the number quickly.
Analogy: Imagine a clock face with numbers in order, but someone rotated it so 12 is not at the top. To find a number, you check which half of the clock still has numbers in order and decide where to look next.
Original sorted array:
[1] -> [2] -> [3] -> [4] -> [5] -> [6] -> [7] -> null
Rotated array example:
[4] -> [5] -> [6] -> [7] -> [1] -> [2] -> [3] -> null
↑ start pointer
↑ mid pointer
↑ end pointer