class Solution {

public:

int findMin(vector<int>& nums) {

```
std::size_t size = nums.size();
if(size < 2){
return nums[0];
}
// all number is in increasing order except at the boundary point
for (auto i = 0; i < size-1; ++i){
if (nums[i] > nums[i+1]){
return nums[i+1];
}
}
return nums[0];
}
```

};