Search⌘ K
AI Features

Solution: Valid Word

C# solution for the Valid Word problem using the Knowing What to Track pattern.

We'll cover the following...

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.

...