You are viewing a single comment's thread. Return to all comments →
Set<Character> chars = new HashSet<>(); for (int i='a'; i<='z'; i++) { chars.add((char)i); } for (char c : s.toCharArray()) { if (c == ' ') continue; if (c >= 'A' && c <= 'Z') { chars.remove((char)(c+32)); } else { chars.remove(c); } } return chars.size() == 0 ? "pangram" : "not pangram";
Seems like cookies are disabled on this browser, please enable them to open this website
Pangrams
You are viewing a single comment's thread. Return to all comments →