Naive algorithm for finding local maxima.