rotated sorted array, binary search