algorithms.tutorialhorizon.com
Find local minimum or local maximum in O(1). | Algorithms
Given an array such that every next element differs from the previous by +/- 1. (i.e. a[i+1] = a[i] +/-1 ) Find the local max OR min in O(1) time