Find a value in an ordered and rotated array