Here is a binary-search solution accepted by the online judge that is guaranteed to terminate after O(logN) iterations:

```
class Solution {
public:
int findMin(vector<int> &num) {
int firstVal = num[0];
int beg = 0;
int end = num.size() - 2;
while(beg <= end)
{
int middle = (beg + end) / 2;
if(num[middle] >= firstVal && num[middle+1] <= firstVal && num[middle] > num[middle+1])
{
return num[middle+1];
}
else if(num[middle+1] >= num[middle] && num[middle] >= firstVal)
{
beg = middle + 1;
}
else //if(num[middle] <= firstVal && num[middle + 1] <= firstVal)
{
end = middle - 1;
}
}
return firstVal;
}
};
```

Is there any input (further than those provided by the judge) that this algorithm would fail to solve correctly?