Bloomberg Interview Question

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