You get a string sentence made of lowercase letters and spaces.
Return true if every letter from a to z appears in it at least once. Otherwise, return false.
Spaces are not letters, so they don't count. A letter may appear many times.
Example 1:
Input: sentence = "my jumpy dog fixed a big quiz with seven lucky parrots" Output: true Explanation: All 26 letters appear at least once.
Example 2:
Input: sentence = "six jumpy kittens quiz the brave fox and a wild hog" Output: false Explanation: The letter c is missing. The other 25 letters all appear.
Example 3:
Input: sentence = "abc abc abc" Output: false Explanation: Only 3 different letters appear: a, b and c.
Constraints:
sentencehas 1 to 1,000 characters.- It has only lowercase English letters and spaces.
- It has at least one letter and doesn't start or end with a space.
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
