class Solution {
public boolean checkIfPangram(String sentence) {
char[] chars = sentence.toCharArray();
int[] flag = new int[30];
for (char aChar : chars) {
flag[aChar - 'a'] ++;
}
for (int i = 0; i < 26; i++) {
if (flag[i] == 0) return false;
}
return true;
}
}
标签:1832,sentence,int,字母,flag,句子
From: https://www.cnblogs.com/eiffelzero/p/16977529.html