<awangdev>259. 3Sum Smaller_1.java
public int threeSumSmaller(int[] nums, int target) {
        if (nums == null || nums.length <= 2) {
            return 0;
        }
        Arrays.sort(nums);
        int count = 0;
        for (int i = 0; i < nums.length - 2; i++) { 
            int start = i + 1, end = nums.length - 1;  
            while (start < end) {
                if (nums[i] + nums[start] + nums[end] < target) {
                    count += end - start;
                    start++;
                } else {
                    end--;
                }
            }
        }
        return count;
    }
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 , 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_8 += var_12 - var_11 ;
        var_11 ++ ;
      }
      else {
        var_12 -- ;
      }
    }
  }
  return var_8 ;
}
