A pangram is a sentence that contains every letter of the English alphabet at least once (case-insensitive). Given a string, return true if it is a pangram, false otherwise. Return false for null or empty input.

The English alphabet contains exactly 26 letters from A to Z. Your solution should check whether all 26 letters appear in the input string, ignoring case and non-alphabetic characters.

Examples:

Input: str = 'The quick brown fox jumps over the lazy dog' Output: true Explanation: This sentence contains all 26 letters of the alphabet Input: str = 'Hello World' Output: false Explanation: This string is missing many letters like a, b, c, etc. Input: str = null Output: false Explanation: Null input returns false Input: str = '' Output: false Explanation: Empty string returns false Input: str = 'abcdefghijklmnopqrstuvwxyz' Output: true Explanation: Contains exactly the 26 letters of the alphabet
Apex Code Editor

Welcome to Lightning Challenge!

How It Works

  • • Write your solution in the code editor
  • • Connect your Salesforce org to test
  • • Submit to check if your solution passes
  • • Use hints if you get stuck

Contest Alert

🏆 #CodeEveryDay October 2026 (Oct 16–31)Sponsored by FLXBL

Contest runs October 16 - 31. Complete challenges to climb the leaderboard!

Prizes 1 & 2: Salesforce certification exam voucher — won by random drawing, where every point is a ticket. see all prizes

Only the 16 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In