```
int findMin(vector<int>& nums) {
return findMin(0, nums.size()-1, nums);
}
int findMin(int low, int high, vector<int>& nums){
if(low==high)
return nums[low];
int mid=(low+high)/2;
if(nums[low]==nums[mid])
return min(findMin(low, mid, nums), findMin(mid+1, high, nums));
return nums[low]>nums[mid] ? findMin(low, mid, nums) : min(nums[low], findMin(mid+1, high, nums));
}
```