An isogram is a word or phrase where every letter appears at most once. The check is case-insensitive, meaning the letter O and the letter o are treated as the same letter. Non-letter characters are ignored during the check. Return true for an empty string or null input since there are no repeated letters.
Examples:
Input: str = 'Dermatoglyphics'
Output: true
Explanation: Every letter appears exactly once
Input: str = 'hello'
Output: false
Explanation: The letter l appears twice
Input: str = 'moOse'
Output: false
Explanation: Case-insensitive check, o appears twice (O and o)
Input: str = ''
Output: true
Explanation: Empty string has no repeated letters
Input: str = null
Output: true
Explanation: Null input returns true
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 accountHow 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 June 2026
Contest runs June 1 - 30. Complete challenges to climb the leaderboard!
Only the 30 daily challenges shown during this contest count toward points. Earlier dailies don't carry over.