update the solution for binary search in rotated & sorted array.