Bloomberg interview question

search an element in an array with increasing and decreasing array elements in o(n) time