public class Solution {
public boolean increasingTriplet(int[] nums) {
if (nums == null  nums.length < 3 ){
return false;
}
int min = Integer.MAX_VALUE;
int secondMin = Integer.MAX_VALUE;
for (int i = 0; i < nums.length; i++){
if (nums[i] <= min){
min = nums[i];
}
else if (nums[i] <= secondMin){
secondMin = nums[i];
}
else {
return true;
}
}
return false;
}
}
Simple Java Solution...Easy to understand!!!!


Since you have to find the 3 numbers in increasing order in a given array you have to traverse through the array starting from 0 index to the end of index while you maintain the min and second minimum value. That is exactly what is done.
Here while traversing we are making sure that min index < second min Index