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

🏆 All Time Leaderboard

Contest runs January 1, 1970 - December 31, 9999. Complete challenges to climb the leaderboard!

Points are calculated for challenges completed during the contest period.

Wally can't hear you

Please sign in to access the AI Assistant

Sign In