@@ -0,0 +1,1087 @@
+/***%0A * Given an array of integers that is already sorted in ascending order, %0A * find two numbers such that they add up to a specific target number.%0A * %0A * The function twoSum should return indices of the two numbers such that they add up to the target, %0A * where index1 must be less than index2. Please note that your returned answers (both index1 and index2) %0A * are not zero-based.%0A * %0A * You may assume that each input would have exactly one solution.%0A * %0A * Input: numbers=%7B2, 7, 11, 15%7D, target=9%0A * Output: index1=1, index2=2 %0A */%0A%0Apublic class Solution %7B%0A    public int%5B%5D twoSum(int%5B%5D numbers, int target) %7B%0A        int%5B%5D result = new int%5B2%5D;%0A        int low = 0; %0A        int high = numbers.length - 1;%0A        while(low %3C high) %7B%0A            if (numbers%5Blow%5D + numbers%5Bhigh%5D == target) %7B%0A                result%5B0%5D = numbers%5Blow%5D;%0A                result%5B1%5D = numbers%5Bhigh%5D;%0A                return result;%0A            %7D%0A            if (numbers%5Blow%5D + numbers%5Bhigh%5D %3E target)%0A                high--;%0A            else%0A                low++;%0A        %7D%0A    %7D%0A    return result;%0A%7D%0A%0A%0A

add TwoSumII.java