find min of rotated array