You are viewing a single comment's thread. Return to all comments →
public static int stringConstruction(String s) { HashMap<Character, Integer> countChar = new HashMap<Character, Integer>(); char[] s_char = s.toCharArray(); for(int i=0; i<s.length(); i++) { if(!countChar.containsKey(s_char[i])) { countChar.put(s_char[i],1); } } return countChar.size(); }
String Construction
You are viewing a single comment's thread. Return to all comments →
80% My Java Solution