You are viewing a single comment's thread. Return to all comments →
public static String pangrams(String s) { char [] strChar = s.toLowerCase().replace(" ", "").toCharArray(); Set<Character> charSet = new HashSet<>(); for(Character c : strChar){ if(c >= 'a' && c <= 'z'){ charSet.add(c); } } if(charSet.size() == 26){ return "pangram"; }else{ return "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 →