题目
代码
执行用时:28 ms, 在所有 Python3 提交中击败了95.54% 的用户
内存消耗:14.8 MB, 在所有 Python3 提交中击败了89.76% 的用户
通过测试用例:79 / 79
class Solution:
def checkIfPangram(self, sentence: str) -> bool:
return len(set(sentence))==26
【方法2】
执行用时:40 ms, 在所有 Python3 提交中击败了33.07% 的用户
内存消耗:14.8 MB, 在所有 Python3 提交中击败了97.90% 的用户
通过测试用例:79 / 79
class Solution:
def checkIfPangram(self, sentence: str) -> bool:
return len(collections.Counter(sentence))==26