Description
Solutions
Submission
Num of Valid Words
🔥 FULLTIME

Determine the number of valid words in a given string s. A valid word contains at least 3 characters with only alphanumeric characters (i.e., the numbers 0-9, letters A-Z in either case), at least one vowel ('a', 'e', 'i', 'o', 'u'), and at least one consonant.

Example 1:

Input:  s = "This is an example string 234."
Output: 3
Explanation:
Only 'this', 'Form16', and 'date' are valid words. Since 'is' only contains 2 characters and 'submis$ion' has an invalid character, they are not valid.

Example 2:

Input:  s = "Bos wins the game."
Output: 4
Explanation:
These four words are all valid, so we return 4 as answer.
Constraints:
    N/A (If you happen to know about it, pls feel free to contact us. TY!
Testcase

Result
Case 1

input:

output: