@@ -0,0 +1,396 @@
+import java.util.HashMap;%0Aimport java.util.Map;%0A%0Aclass TwoSum %7B%0A  public static int%5B%5D twoSum(int%5B%5D nums, int target) %7B%0A    Map%3CInteger, Integer%3E map = new HashMap%3C%3E();%0A    for (int i = 0; i %3C nums.length; i++) %7B%0A      if (map.containsKey(target - nums%5Bi%5D)) %7B%0A        return new int%5B%5D %7Bmap.get(target - nums%5Bi%5D), i%7D;%0A      %7D else %7B%0A        map.put(nums%5Bi%5D, i);%0A      %7D%0A    %7D%0A    return null;%0A  %7D%0A%7D

Add solution 1