You are viewing a single comment's thread. Return to all comments →
Simple Solution in Java O(N) =D
Scanner sc = new Scanner(System.in); String str = sc.nextLine().replace("\\s+","").toLowerCase(); BitSet b = new BitSet(); for(char c: str.toCharArray()){ if(c >='a' && c<='z'){ b.set(c-'a'); } } System.out.println(b.cardinality()==26?"pangram":"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 →
Simple Solution in Java O(N) =D