Search in Nearly Sorted Array
Property: Each element can be at its correct position OR swapped with adjacent element.
Solution: At each step, check mid-1, mid, and mid+1
mid-1
mid
mid+1
Time: O(log n) β Still logarithmic!
O(log n)