Question: A peak element in an array is an element that is greater than its neighbours (note that the peak element can occur at either end
A peak element in an array is an element that is greater than its neighbours (note that the peak element can occur at either end of the array). Write a theta (log n) Divide & Conquer algorithm that finds the peak element in an array A of n elements.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
