<awangdev>Two Sum II - Input array is sorted_1.java
public int[] twoSum(int[] numbers, int target) {
        if (numbers == null || numbers.length == 0) {
            return numbers;
        }
        final int[] result = new int[2];
        int start = 0;
        int end = numbers.length - 1;
        while (start < end) {
            long sum = (long)(numbers[start] + numbers[end]);
            if (sum == target) {
                result[0] = start + 1;
                result[1] = end + 1;
                break;
            } else if (sum < target) {
                start++;
            } else {
                end--;
            }
        }
        return result;
    }
public int [ ] sample_funcname ( int [ ] var_0 , int var_1 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return var_0 ;
  }
  final int [ ] var_6 = new int [ 2 ] ;
  int var_7 = 0 ;
  int var_9 = var_0 . length - 1 ;
  while ( var_7 < var_9 ) {
    long var_10 = ( long ) ( var_0 [ var_7 ] + var_0 [ var_9 ] ) ;
    if ( var_10 == var_1 ) {
      var_6 [ 0 ] = var_7 + 1 ;
      var_6 [ 1 ] = var_9 + 1 ;
      break ;
    }
    else if ( var_10 < var_1 ) {
      var_7 ++ ;
    }
    else {
      var_9 -- ;
    }
  }
  return var_6 ;
}
