Find minimum element in a rotated array