@@ -0,0 +1,599 @@
+package org.pilgrim.leetcode.y2022;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class SumTwo %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09// TODO Auto-generated method stub%0A%0A%09%7D%0A%0A%09public int%5B%5D twoSum(int%5B%5D nums, int target) %7B%0A%09%09if (nums == null %7C%7C nums.length %3C= 0) %7B%0A%09%09%09return null;%0A%09%09%7D%0A%0A%09%09// Map value, index%0A%09%09Map%3CInteger, Integer%3E map = new HashMap%3C%3E();%0A%0A%09%09for (int i = 0; i %3C nums.length; i++) %7B%0A%09%09%09int a = nums%5Bi%5D;%0A%09%09%09int b = target - a;%0A%0A%09%09%09Integer index = map.get(b);%0A%09%09%09if (index != null) %7B%0A%09%09%09%09return new int%5B%5D %7B i, index %7D;%0A%09%09%09%7D%0A%0A%09%09%09map.put(a, i);%0A%09%09%7D%0A%0A%09%09return null;%0A%09%7D%0A%0A%7D%0A

Create SumTwo.java