min in rotated