leetcode solution of 1832 in java

Check if the Sentence Is Pangram:-

A pangram is a sentence where every letter of the English alphabet appears at least once.

Given a string sentence containing only lowercase English letters, returntrue if sentence is a pangram, or false otherwise.

Solution:-

Flow Diagram:-

Code Block:-

 public static boolean checkIfPangram(String sentence) {
	        Set  s = new <>();
	        for (int i = 0; i < sentence.length(); ++i)
	            s.add(sentence.charAt(i));
	        if( s.size() == 26)
	        {
	        	return true;
	        }
	        else return false;
	    }