A word is considered valid if:
- It contains a minimum of 3 characters.
- It consists of the digits 0-9, and the uppercase and lowercase English letters. (Not necessary to have all of them.)
- It includes at least one vowel.
- It includes at least one consonant.
You are given a string
word.Return
trueifwordis valid, otherwise, returnfalse.Notes:
'a','e','i','o','u', and their uppercases are vowels.- A consonant is an English letter that is not a vowel.
1 | class Solution { |