• + 0 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";
        }