in the video at 19:10, a case is explained by prateek bhaiya, i want to know that in that case suppose if the element is at the right of the upper part (which he has shown in graphical form) and that portion of array is unsorted then how we apply binary search over that part
Binary search in rotated array
Hey @Learning_bunny
In that case our element will lie either on high slope on right or the low slope on right, in both cases we need to reduce search space to right half. Then if you notice carefully you reach the same stage as you were in before going to right but your problem is now smaller. In the end you’ll reach a region where the array will be sorted only.
If your query is resolved please mark it as closed.