Tap here to switch tabs
Problem
Submissions

Problem: Valid Word

med
30 min
Try to solve the Valid Word problem.

Statement

Given a string word, determine whether it is a valid word.

A string word is considered valid if all of the following conditions are true:

  1. The length of word is at least 33.

  2. word contains at least one vowel character.

  3. word contains at least one consonant character.

  4. Every character in word is an English letter (uppercase or lowercase) or a digit.

Return true if word is valid, otherwise return false.

Note: Vowels are a, e, i, o, u (case insensitive). Consonants are English letters that are not vowels.

Constraints:

  • 1≤1 \leq word.length ≤20\leq 20

  • word consists of English uppercase and lowercase letters, digits, '@', '#', and '$'.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Valid Word

med
30 min
Try to solve the Valid Word problem.

Statement

Given a string word, determine whether it is a valid word.

A string word is considered valid if all of the following conditions are true:

  1. The length of word is at least 33.

  2. word contains at least one vowel character.

  3. word contains at least one consonant character.

  4. Every character in word is an English letter (uppercase or lowercase) or a digit.

Return true if word is valid, otherwise return false.

Note: Vowels are a, e, i, o, u (case insensitive). Consonants are English letters that are not vowels.

Constraints:

  • 1≤1 \leq word.length ≤20\leq 20

  • word consists of English uppercase and lowercase letters, digits, '@', '#', and '$'.