Bloomberg Interview Question

(On Site)

Interview Answer

Anonymous

Jan 25, 2019

Given an array of y coordinates (integers), find a (any) "peak", where a peak is defined as an integer whos greater than or equal to both the integer before and after it in the array (if they exist).