Suppose an array of length `n` sorted in ascending order is rotated between `1` and `n` times. Given the sorted rotated array `nums` of unique elements, return the minimum element of this array. You must write an algorithm that runs in `O(log n)` time.
Binary Search on Rotated Range
Since the array was originally sorted, the rotation creates two sorted halves. The minimum element is the only element that is smaller than its predecessor, and it's also the element we are looking for using binary search. If `nums[mid] >= nums[left]`, it means the left half is sorted, so the minimum must be in the right half. Otherwise, it's in the left half.