Concept Flow - Find Peak Element Using Binary Search
Start with array and low=0, high=n-1
Calculate mid = (low+high)/2
Compare nums[mid
nums[mid
| No
Move high to mid
Check if low == high
Return low as peak index
The binary search narrows down the search space by comparing middle element with its right neighbor, moving towards the peak until low meets high.
