@@ -0,0 +1,614 @@
+import java.util.HashMap;%0Aimport java.util.Map;%0A%0Apublic class _387FirstUniqueCharacterInAString %7B%0A    public int firstUniqChar(String s) %7B%0A        char%5B%5D c = s.toCharArray();%0A        Map%3CCharacter, Integer%3E map = new HashMap%3CCharacter, Integer%3E();%0A        for (int i =0; i %3C c.length; i++) %7B%0A        %09if (!map.containsKey(c%5Bi%5D)) map.put(c%5Bi%5D, i);%0A        %09else if (map.containsKey(c%5Bi%5D)) map.replace(c%5Bi%5D, -1);%0A        %7D%0A        if (map.isEmpty()) return -1;%0A        else %7B%0A        %09for (int i =0; i %3C c.length; i++) %7B%0A        %09%09if (map.containsValue(i)) return i;%0A        %09%7D%0A        %09return -1;%0A        %7D%0A    %7D%0A%7D%0A

Add 387 solution