You are viewing a single comment's thread. Return to all comments →
public static int stringConstruction(String s) { Set<Character> set = new HashSet<>(); for (char c : s.toCharArray()) { set.add(c); } return set.size(); }
Seems like cookies are disabled on this browser, please enable them to open this website
String Construction
You are viewing a single comment's thread. Return to all comments →
Java Code using HashSet