Check if the Sentence Is Pangram - Problem
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.
Input & Output
Example 1 — Complete Pangram
$
Input:
sentence = "thequickbrownfoxjumpsoverthelazydog"
›
Output:
true
💡 Note:
This famous sentence contains every letter from a-z at least once, making it a pangram.
Example 2 — Missing Letters
$
Input:
sentence = "leetcode"
›
Output:
false
💡 Note:
Missing many letters like 'a', 'b', 'f', 'g', etc. Only contains: l, e, t, c, o, d (6 unique letters).
Example 3 — Short Sentence
$
Input:
sentence = "abc"
›
Output:
false
💡 Note:
Only contains 3 letters (a, b, c) out of the required 26 letters.
Constraints
- 1 ≤ sentence.length ≤ 1000
- sentence consists of lowercase English letters only
Visualization
Tap to expand
Understanding the Visualization
1
Input
String containing only lowercase letters
2
Process
Check if all 26 letters a-z appear at least once
3
Output
Return true if pangram, false otherwise
Key Takeaway
🎯 Key Insight: Use a hash set to track unique letters and return early when all 26 are found
💡
Explanation
AI Ready
💡 Suggestion
Tab
to accept
Esc
to dismiss
// Output will appear here after running code