```
public boolean increasingTriplet(int[] nums) {
int len = nums.length;
if (nums == null || nums.length < 3) {
return false;
}
int[] mark = new int[len];
for (int i = 0; i < len; i++) {
mark[i] = 1;
}
for (int i = 0; i < len; i++) {
int max = 0;
for (int j = 0; j < i; j++) {
if (nums[i] > nums[j]) {
max = Math.max(max, mark[j]);
mark[i] = max + 1;
if (max + 1 >= 3) {
return true;
}
}
}
}
return false;
}
```