@@ -0,0 +1,707 @@
+package com.dw.leetcode;%0A%0Apublic class Two_Sum_II_Input_array_is_sorted %7B%0A%09%0A%09public int%5B%5D twoSum(int%5B%5D numbers, int target) %7B%0A       %0A%09%09int start = 0, end = numbers.length - 1;%0A%09%09%0A%09%09while((numbers%5Bstart%5D + numbers%5Bend%5D) != target) %7B%0A%09%09%09if(numbers%5Bstart%5D + numbers%5Bend%5D %3C target) start ++;%0A%09%09%09if(numbers%5Bstart%5D + numbers%5Bend%5D %3E target) end--;%0A%09%09%7D%0A%09%09%0A%09%09return new int%5B%5D %7Bstart +1,end+1%7D;%0A%09%09%0A    %7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09// TODO Auto-generated method stub%0A%09%09int%5B%5D array = new int%5B%5D%7B2, 7, 11, 15%7D;%0A%09%09Two_Sum_II_Input_array_is_sorted s = new Two_Sum_II_Input_array_is_sorted();%0A%09%09int%5B%5D result = s.twoSum(array,13);%0A%09%09%0A%09%09System.out.println(result%5B0%5D);%0A%09%09System.out.println(result%5B1%5D);%0A%09%7D%0A%0A%7D%0A

add leetcode 167