As the title said,it's an array which has been rotated beforehead.So I dont understand.
[1,3,3] is a sort array, isnt it?
Why such a test case exists ? The input array is [1,3,3]


I think if the array rotate in the pivot 0, it is the same array as before.
So the test case(un rotated array) should be included.
There is one possible solution here. I can not solve the problem when I try to compare the mid with the left.
I can only do it compare the mid with the right to avoid the un rotated array!int findMin(vector<int>& nums) { int left = 0; if (nums.size() == 1) return nums[0]; int right = nums.size()  1; while (left < right) { int mid = left + (right  left) / 2; if (nums[mid] > nums[right]) left = mid + 1; else right = mid; } return nums[left]; }
I hope my answer can help you!