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!

Create an Account

Sign up to track your progress, earn points, and compete with others. Your solutions will be saved automatically.

Create account

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 Mar 2026

Contest runs March 3 - 31. Complete challenges to climb the leaderboard!

Points are calculated for challenges completed during the contest period.