Show problems as
Classic problem #1832EasyHash TableString

Check if the Sentence Is Pangram

Real-world version: Does the Notice Use Every Letter
Tracked in this browser only
Read Check if the Sentence Is Pangram on LeetCode(opens in a new tab)

The statement here is our own: the same inputs, outputs and technique.

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 starts with this. It matches the parent problem's shape, so a solution that works here works on a standard judge unchanged.

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