You are viewing a single comment's thread. Return to all comments →
static boolean[] alphaVector = new boolean[26]; public static String pangrams(String s) { char[] arr = s.toCharArray(); for(char c : arr ){ if(!Character.isLetter(c)) continue; char lower = Character.toUpperCase(c); alphaVector[lower-'A'] = true; } System.out.println(Arrays.toString(alphaVector)); for(boolean marker:alphaVector ){ if(!marker) 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 →