Walmart interview question

find an element in a rotated sorted array