comefrom: <awangdev>Triangle Count_2.java
code: public int triangleCount(int S[]) {
      	if (S == null || S.length == 0) {
      		return 0;
      	}
      	Arrays.sort(S);
      	int count = 0;
      	for (int i = 0; i < S.length; i++) {
      		int left = 0;
      		int right = i - 1; 
      		while (left < right){
      			if (S[left] + S[right] > S[i]) {
  	    			count += (right - left);
  	    			right--;
  	    		} else {
  	    			left++;
  	    		}
      		}
      	}
      	return count;
      }
masked: public int sample_funcname ( int var_0 [ ] ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return 0 ;
    }
    Arrays . sort ( var_0 ) ;
    int var_1 = 0 ;
    for ( int var_2 = 0 ;
    var_2 < var_0 . length ;
    var_2 ++ ) {
      int var_3 = 0 ;
      int var_4 = var_2 - 1 ;
      while ( var_3 < var_4 ) {
        if ( var_0 [ var_3 ] + var_0 [ var_4 ] > var_0 [ var_2 ] ) {
          var_1 += ( var_4 - var_3 ) ;
          var_4 -- ;
        }
        else {
          var_3 ++ ;
        }
      }
    }
    return var_1 ;
  }
  