Search in rotated array with duplicates.