Another trick for pivot element

Can we just check for local minima and local maxima to find the pivot element?

Hi @sharad1103
We can check for local minima to find pivot. But it will take O(N) time. Binary search does it in Log(N) instead.

Hope this helps :slight_smile: