suppose we are given an array a[1..n] of distinct numbers with the special property that a[1]>a[2] and a[n-1]<a[n] . we say that an element a[x] is a local minimum if it is less that both its neighbors or more formally if a[x-1]>a[x] and a[x]<a[x+1] for example there are two local minima (3 and 1) in the following

array : 9372145

we can obviously find a local minimum in O(n) time by scanning through the array describe and analyze an algorithm that finds a locall minimum in O(log n) time . if there is more than one local minimum . finding any of them is fine .[Hint : whit the given boundary conditions rhe array must have at least one local minimum.]