Learned finding minimum in an array when the array is rotated