package no001.two.sum;

import java.util.HashMap;
import java.util.Map;

public class Solution {
  public int[] twoSum(int[] nums, int target) {
    Map<Integer, Integer> numsMap = new HashMap<>();
    for(int i=0;i<nums.length;i++) {
      int complement = target - nums[i];
      if(numsMap.containsKey(complement)) {
        return new int[] {i, numsMap.get(complement)};
      }
      numsMap.put(nums[i], i);
    }
    throw new IllegalArgumentException("No two sum solution");
  }
}

@@ -90,16 +90,17 @@
 ution %7B%0A
+%0A
   public
@@ -203,19 +203,25 @@
  for
+ 
 (int i
-=0;i%3C
+ = 0; i %3C 
 nums
@@ -228,16 +228,17 @@
 .length;
+ 
 i++) %7B%0A 
@@ -285,16 +285,17 @@
       if
+ 
 (numsMap
@@ -346,17 +346,16 @@
 ew int%5B%5D
- 
 %7Bi, nums

apply google code format