Given an array of integers, find the local minima. An element A[i] is defined as a local minimum if A[i-1] > A[i] and A[i] < A[i+1] where i = 1...n-2. In case of boundar
The number of local minima can be n/2; you can't enumerate them all in O(log n) time.
n/2
O(log n)