@@ -0,0 +1,827 @@
+import java.util.Arrays;%0A%0Apublic class LeetCode0167 %7B%0A    public int%5B%5D twoSum(int%5B%5D numbers, int target) %7B%0A        int%5B%5D result = new int%5B%5D %7B -1, -1 %7D;%0A        if (numbers == null %7C%7C numbers.length %3C 2) %7B%0A            return result;%0A        %7D%0A        int i = 0, j = numbers.length - 1;%0A        while (i %3C j) %7B%0A            if (numbers%5Bi%5D + numbers%5Bj%5D == target) %7B%0A                return new int%5B%5D %7B i + 1, j + 1 %7D;%0A            %7D%0A            if (numbers%5Bi%5D + numbers%5Bj%5D %3C target) %7B%0A                i++;%0A            %7D else %7B%0A                j--;%0A            %7D%0A        %7D%0A        return result;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        LeetCode0167 leetcode = new LeetCode0167();%0A        int%5B%5D numbers = new int%5B%5D %7B 2, 7, 11, 15 %7D;%0A        System.out.println(Arrays.toString(leetcode.twoSum(numbers, 9)));%0A    %7D%0A%7D%0A

Add LeetCode0167.java