Finding minimum element in rotated sorted array