binary search. However, it is not intuitive to prove that.
Anonymous
Nov 7, 2014
always u should ask for assumptions to achieve sublinear performance
anyhow,if u are given an array of numeric values.
u can do it in linear
keep tracking the sign of the difference between neighbors
each sign change from negative to positive you got a local minimal
and dont forget end points