You are viewing a single comment's thread. Return to all comments →
public static String pangrams(String s) { // Write your code here int count[] = new int[26]; for(int i = 0; i < s.length(); i++) { char ch = Character.toLowerCase(s.charAt(i)); if(ch >= 'a' && ch <= 'z') { //small letters count[ch - 'a']++; } } for(int i = 0; i < count.length; i++) { if(count[i] == 0) { return "not pangram"; } } return "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 →