You are viewing a single comment's thread. Return to all comments →
JAVA 8
public static String pangrams(String s) { s = s.toLowerCase().replaceAll("[^a-z]", ""); Set<Character> chars = new HashSet<>(); for(int i=0; i<s.length(); i++) { chars.add(s.charAt(i)); } return chars.size() == 26? "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 →
JAVA 8