TopCoder problem "GoodWord" used in SRM 13 (Division I Level One , Division II Level One)



Problem Statement

    
Class Name:  GoodWord
Method Name: isValid
Parameters:  String
Returns:     boolean

In a certain language, words are valid if and only if each group of vowels in
the word is followed by exactly the same number of consonants (no more, no
less) and the first letter is capital and all other letters are lowercase.

Implement a class GoodWord, which contains a method isValid.  isValid takes a
String as a parameter and returns a boolean that is true if the String is a
valid word in the language and false otherwise.

Vowels are a, e, i, o, and u (and their capital equivalents).  All other
letters are consonants.

Here is the method signature:
boolean isValid(String word);

TopCoder will ensure the following:
- word contains between 1 and 50 letters.

Examples:
"Hi" returns false.
"Hih" returns true.
"Baaaiedddffaigg" returns true.
"H" returns true.
 

Definition

    
Class:GoodWord
Method:isValid
Parameters:String
Returns:boolean
Method signature:boolean isValid(String param0)
(be sure your method is public)
    

Problem url:

http://www.topcoder.com/stat?c=problem_statement&pm=100

Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=3012&pm=100

Writer:

Unknown

Testers:

Problem categories: