You are given an integer array nums of unique values that was sorted in ascending order and then rotated between 1 and n times (rotating n times restores the original order). Rotating once moves the last element to the front.
For example, [0, 1, 2, 4, 5, 6, 7] rotated 4 times gives [4, 5, 6, 7, 0, 1, 2].
Return the minimum element of nums.
You must write an algorithm that runs in O(logn) time.