• + 6 comments

    Here is my solution:

    public class Solution {
    public static void main(String args[] ) throws Exception {
        /* Enter your code here. Read input from STDIN. Print    output to STDOUT */
        Scanner scn = new Scanner(System.in);
        String s = scn.nextLine();
        Set<Character> setValue = new HashSet<Character>(); 
    
        String replaced = s.replaceAll(" ","").toLowerCase();
         for(int i = 0; i<replaced.length(); i++)
         {
             setValue.add(replaced.charAt(i));
         }
    
        if(seValue.size() == 26)
        {
            System.out.print("pangram");
        }
        else
        {
            System.out.print("not pangram");
        }
    }
    

    }