@@ -0,0 +1,489 @@
+package no001.two.sum;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class Solution %7B%0A  public int%5B%5D twoSum(int%5B%5D nums, int target) %7B%0A    Map%3CInteger, Integer%3E numsMap = new HashMap%3C%3E();%0A    for(int i=0;i%3Cnums.length;i++) %7B%0A      int complement = target - nums%5Bi%5D;%0A      if(numsMap.containsKey(complement)) %7B%0A        return new int%5B%5D %7Bi, numsMap.get(complement)%7D;%0A      %7D%0A      numsMap.put(nums%5Bi%5D, i);%0A    %7D%0A    throw new IllegalArgumentException(%22No two sum solution%22);%0A  %7D%0A%7D%0A

solved no1