엔지니어 게시판
LeetCode 솔루션 분류

[10/17] 1832. Check if the Sentence Is Pangram

컨텐츠 정보

본문

Easy
109126Add to ListShare

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

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

 

Example 1:

Input: sentence = "thequickbrownfoxjumpsoverthelazydog"
Output: true
Explanation: sentence contains at least one of every letter of the English alphabet.

Example 2:

Input: sentence = "leetcode"
Output: false

 

Constraints:

  • 1 <= sentence.length <= 1000
  • sentence consists of lowercase English letters.
Accepted
112,833
Submissions
138,921

관련자료

댓글 1

학부유학생님의 댓글

  • 익명
  • 작성일
Runtime: 54 ms, faster than 57.41% of Python3 online submissions for Check if the Sentence Is Pangram.
Memory Usage: 13.8 MB, less than 54.73% of Python3 online submissions for Check if the Sentence Is Pangram.
class Solution:
    def checkIfPangram(self, sentence: str) -> bool:
        return len(set(sentence)) == 26
전체 404 / 1 페이지
번호
제목
이름

최근글


인기글


새댓글


Stats


알림 0