<awangdev>259. 3Sum Smaller_2.java
public int threeSumSmaller(int[] nums, int target) {
        if (nums == null || nums.length <= 2) {
        	return 0;
        }
        Arrays.sort(nums);
        int rst = 0;
        for (int i = 0; i < nums.length - 2; i++) {
        	int j = i + 1; 
        	int k = nums.length - 1;
        	while (j < k) {
        		if (nums[i] + nums[j] + nums[k] >= target) {
        			k--;
        		} else {
        			rst += (k - j);
        			j++;
        		}
        	}
        }
        return rst;
    }
public int sample_funcname ( int [ ] var_0 , int var_1 ) {
  if ( var_0 == null || var_0 . length <= 2 ) {
    return 0 ;
  }
  Arrays . sort ( var_0 ) ;
  int var_8 = 0 ;
  for ( int var_9 = 0 ;
  var_9 < var_0 . length - 2 ;
  var_9 ++ ) {
    int var_11 = var_9 + 1 ;
    int var_12 = var_0 . length - 1 ;
    while ( var_11 < var_12 ) {
      if ( var_0 [ var_9 ] + var_0 [ var_11 ] + var_0 [ var_12 ] >= var_1 ) {
        var_12 -- ;
      }
      else {
        var_8 += ( var_12 - var_11 ) ;
        var_11 ++ ;
      }
    }
  }
  return var_8 ;
}
