Intro to Algorithms: Peak Finding Algorithm 1