All problems
0998EasyHash TableString

Does the Notice Use Every Letter

Tracked in this browser only
Write code

Trains the technique from

LeetCode 1832Check if the Sentence Is Pangram

This is an original problem, written from a brief that listed the technique, the difficulty, the topics, the function shape and the input bounds — none of that problem's wording, examples, hints or editorials. The link is there so you can map your practice onto the standard set.

Same function shape, different story and different numbers.

A notice is given as the string notice, written in lowercase English letters and nothing else.

Return whether the notice uses every one of the twenty-six letters at least once.

Examples

Example 1

Input
notice = "packmyboxwithfivedozenliquorjugs"
Output
true

Every letter of the alphabet turns up somewhere in the notice, several of them more than once, which is allowed.

Example 2

Input
notice = "abcdefghijklmnopqrstuvwxy"
Output
false

The notice runs from the first letter to the twenty-fifth and stops, so the last letter never appears.

Example 3

Input
notice = "hello"
Output
false

Far too short to hold all twenty-six letters, and it uses only four different ones.

Constraints

  • 1 <= notice.length <= 1000
  • notice consists of lowercase English letters only.

The signature

The editor is preloaded with this. It matches the parent problem's shape, so a solution that works here transfers to a judge unchanged.

Python
def check_if_pangram(notice: str) -> bool:
Java
public boolean checkIfPangram(String notice)
September 7
Apply