• + 0 comments
    public static String pangrams(String s) {
      boolean[] alphabet = new boolean[26];
    
      for (int i = 0; i < s.length(); i++) {
        if (s.charAt(i) >= 'a' && s.charAt(i) <= 'z') {
          System.out.println(s.charAt(i) - 'a');
          alphabet[(s.charAt(i) - 'a')] = true;
        } else if (s.charAt(i) >= 'A' && s.charAt(i) <= 'Z') {
          alphabet[s.charAt(i) - 'A'] = true;
        }
      }
      for (int i = 0; i < alphabet.length; i++) {
        if (!alphabet[i]) {
          return "not pangram";
        }
      }
      return "pangram";
    }