InternDoor

Does it use every letter?

Easystrings · hashing

Reported in interviews at (where)

Return whether s contains every letter of the English alphabet, a to z, at least once.

Upper and lower case count as the same letter, and anything that is not a letter (spaces, digits, punctuation) is ignored.

Example 1
Input
s = "The five boxing wizards jump quickly."
Output
true

All 26 letters appear somewhere, in one case or the other.

Example 2
Input
s = "Hello, world"
Output
false

Most letters are missing.

Example 3
Input
s = "abcdefghijklmnopqrstuvwxy"
Output
false

Everything except z.

Limits

  • 0 <= s.length <= 100000
  • s holds printable ASCII characters

Hints

Hint 1

Keep 26 flags, or a set, of the letters seen so far. Lower-case each character and skip anything outside a to z.

Where this was reported

Our own problem on the task these candidates describe; the wording, examples and tests are InternDoor’s.

Run your code to check it on the examples. Submit runs every hidden test.

Ready for the real one?

Engineering internships and entry-level jobs in India, newest first.