MAQ Software Interview Question

Finding a peak element in an array,