```
class Solution {
public:
bool increasingTriplet(vector<int>& nums) {
int i, n = nums.size();
if(n<3)
return false;
int minimum = nums[0];
int secondMinimum = INT_MIN;
for(i=1; i<n; i++)
{
if(nums[i]<=minimum)
minimum = nums[i];
else if(secondMinimum==INT_MIN || secondMinimum>=nums[i])
secondMinimum = nums[i];
else
return true;
}
return false;
}
};
```