Concept Flow - Search in Rotated Sorted Array
Start: Given rotated sorted array and target
Initialize low=0, high=n-1
While low <= high
Calculate mid = (low+high)/2
Check if arr[mid
Return mid
If left half sorted
Target in left?
high=mid-1
Repeat loop
If not found
Return -1
This flow shows how binary search adapts to a rotated sorted array by checking sorted halves and narrowing search.
