<awangdev>1. Two Sum_2.java
public int[] twoSum(int[] numbers, int target) {
        if (numbers == null || numbers.length == 0) {
            return null;
        }
        int[] original = new int[numbers.length];
        for (int i = 0; i < numbers.length; i++) {
            original[i] = numbers[i];
        }
        
        Arrays.sort(numbers);
        int start = 0; 
        int end = numbers.length - 1;
        int num1 = -1;
        int num2 = -1;
        while (start != end) {
            int sum = numbers[start] + numbers[end];
            if (sum == target) {
                num1 = numbers[start];
                num2 = numbers[end];
                break;
            }else if (sum < target) {
                start++;
            } else {
                end--;
            }
        }

        int[] rst = new int[2];
        rst[0] = -1;
        rst[1] = -1;
        for (int i = 0; i < original.length; i++) {
            if (original[i] == num1 || original[i] == num2) {
                if (rst[0] == -1) {
                    rst[0] = i + 1;
                } else {
                    rst[1] = i + 1;
                    break;
                }
            }
        }
        return rst;
    }
public int [ ] sample_funcname ( int [ ] var_0 , int var_1 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return null ;
  }
  int [ ] var_5 = new int [ var_0 . length ] ;
  for ( int var_6 = 0 ;
  var_6 < var_0 . length ;
  var_6 ++ ) {
    var_5 [ var_6 ] = var_0 [ var_6 ] ;
  }
  Arrays . sort ( var_0 ) ;
  int var_9 = 0 ;
  int var_11 = var_0 . length - 1 ;
  int var_12 = - 1 ;
  int var_13 = - 1 ;
  while ( var_9 != var_11 ) {
    int var_14 = var_0 [ var_9 ] + var_0 [ var_11 ] ;
    if ( var_14 == var_1 ) {
      var_12 = var_0 [ var_9 ] ;
      var_13 = var_0 [ var_11 ] ;
      break ;
    }
    else if ( var_14 < var_1 ) {
      var_9 ++ ;
    }
    else {
      var_11 -- ;
    }
  }
  int [ ] var_16 = new int [ 2 ] ;
  var_16 [ 0 ] = - 1 ;
  var_16 [ 1 ] = - 1 ;
  for ( int var_6 = 0 ;
  var_6 < var_5 . length ;
  var_6 ++ ) {
    if ( var_5 [ var_6 ] == var_12 || var_5 [ var_6 ] == var_13 ) {
      if ( var_16 [ 0 ] == - 1 ) {
        var_16 [ 0 ] = var_6 + 1 ;
      }
      else {
        var_16 [ 1 ] = var_6 + 1 ;
        break ;
      }
    }
  }
  return var_16 ;
}
