IntermediateRating 1300
Minimum of a Rotated List
A sorted list of distinct numbers was rotated (moved some numbers from the front to the back). Find the minimum using binary search.
Input
n, then n integers.
Output
One integer.
Sample 1
Input
5 3 4 5 1 2
Output
1
Sample 2
Input
7 4 5 6 7 0 1 2
Output
0
Output appears here