Find an element in a rotated sorted array