엔지니어 게시판
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
전체 396 / 3 페이지
번호
제목
이름

최근글


인기글


새댓글


Stats


  • 현재 접속자 223 명
  • 오늘 방문자 4,563 명
  • 어제 방문자 5,332 명
  • 최대 방문자 11,134 명
  • 전체 회원수 1,048 명
알림 0