Palo Alto Networks interview question

Find the peak element using binary search