Pangram Checker - Problem
A pangram is a sentence that contains every letter of the alphabet at least once. For example, "The quick brown fox jumps over the lazy dog" is a famous pangram.
Given a string sentence, write a function to determine if it is a pangram. The check should be case-insensitive, meaning both uppercase and lowercase letters count.
Note: Only English alphabet letters (a-z) need to be considered. Numbers, spaces, and special characters can be ignored.
Input & Output
Example 1 — Classic Pangram
$
Input:
sentence = "The quick brown fox jumps over the lazy dog"
›
Output:
true
💡 Note:
This famous sentence contains all 26 letters: t,h,e,q,u,i,c,k,b,r,o,w,n,f,x,j,m,p,s,v,l,a,z,y,d,g
Example 2 — Missing Letters
$
Input:
sentence = "Hello world"
›
Output:
false
💡 Note:
Contains only 7 unique letters: h,e,l,o,w,r,d. Missing 19 letters including a,b,c,f,g,i,j,k,m,n,p,q,s,t,u,v,x,y,z
Example 3 — Mixed Case
$
Input:
sentence = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
›
Output:
true
💡 Note:
All 26 uppercase letters present. Case-insensitive check passes since all alphabet letters are covered
Constraints
- 1 ≤ sentence.length ≤ 1000
- sentence consists of lowercase and uppercase English letters, digits, and spaces
Visualization
Tap to expand
💡
Explanation
AI Ready
💡 Suggestion
Tab
to accept
Esc
to dismiss
// Output will appear here after running code