218 1/3/2017 8:38:05 AM


:

Sequence <A1', A2', ...An'> of numbers

:

 

For each i in array(n)

If A(i-1) <= A(i) >= A(i+1)

return i

End If

End For

:

O(1)