Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- python3
- LeetCode
- 청년무직자전세대출
- maketrans
- 중기청대출
- 버팀목청년전세대출
- leetcode1880
- javascript
- Array
- 1913
- string
- 1880
- REVERSE
- 청년전세
- sort numbers
- Python
- 청년맞춤형전세대출
- Ethiopian veterans
- 청년전세대출
- 청년전용전세대출
- translate
- Ethiopian Veterans of the Korean War
- a
- Sort
- Kagnew
- 1859
- revers
- Sorting
- leetcode832
Archives
- Today
- Total
Momentary Comfort
[LeetCode][Python] | 1832. 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, 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.
class Solution:
def checkIfPangram(self, sentence: str) -> bool:
return len(set(sentence)) == 26
# (runtime / memory)
# 20 ms / 14.2 MB
Click the link if you want to check a solution using Python: https://momentarycomfort.tistory.com/681
'Algorithm' 카테고리의 다른 글
Comments