You are viewing a single comment's thread. Return to all 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"); } }
}
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 solution:
}