Search In An Almost Sorted Array Leetcode