How can we check for the local maxima of an array?

Technical