You are viewing a single comment's thread. Return to all comments →
here is my java solution passed all test cases
public static void main(String args[] ) throws Exception { Scanner t=new Scanner(System.in); String s =t.nextLine(); StringBuilder sb=new StringBuilder(s); Set<Character> p=new HashSet<Character>(); if(sb.length()<26){ System.out.println("not pangram "); } else{ for(int i=0;i<sb.length();i++) { char z=sb.charAt(i); p.add(Character.toLowerCase(z)); } if(p.size()>26) System.out.println("pangram"); else System.out.println("not 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 →
here is my java solution passed all test cases