public class Solution {

public boolean increasingTriplet(int[] nums) {

```
if (nums.length < 3)
{
return false;
}
int indexOne = 0, indexTwo, indexThree;
while (indexOne < (nums.length - 2))
{
indexTwo = indexOne + 1;
while ((indexTwo < nums.length) && (nums[indexOne] >= nums[indexTwo]))
{
indexOne = indexTwo;
indexTwo++;
}
indexThree = indexTwo + 1;
while (indexThree < nums.length)
{
if (nums[indexThree] > nums[indexTwo])
{
return true;
}
else if (nums[indexThree] > nums[indexOne])
{
indexTwo = indexThree;
indexThree++;
}
else
{
indexThree++;
}
}
indexOne++;
}
return false;
}
```

}