TopCoder problem "VowelLatin" used in SRM 336 (Division II Level One)



Problem Statement

    Pig Latin is a simple way of encoding words. We have invented a competitor called "Vowel Latin". It just changes the order of the letters in a word by moving all the vowels to the end, keeping them in the same order as they appeared in the original word.

Vowels are defined to be the letters 'a', 'e', 'i', 'o', and 'u' (in either uppercase or lowercase). The reordering of the letters in a word does not change their case. So the Vowel Latin version of "AmplifierX" would be "mplfrXAiie"

Create a class VowelLatin that contains a method translate that is given a String word and that returns the Vowel Latin version of word.

 

Definition

    
Class:VowelLatin
Method:translate
Parameters:String
Returns:String
Method signature:String translate(String word)
(be sure your method is public)
    
 

Constraints

-word contains between 1 and 50 characters, inclusive.
-Each character in word is a letter ('A'-'Z', 'a'-'z').
 

Examples

0)
    
"XYz"
Returns: "XYz"
The word contains no vowels so it is unchanged by translating to Vowel Latin.
1)
    
"application"
Returns: "pplctnaiaio"
The 5 vowels in this word are all moved to the end of the word.
2)
    
"qwcvb"
Returns: "qwcvb"
3)
    
"aeioOa"
Returns: "aeioOa"

Problem url:

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

Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=10660&pm=6090

Writer:

dgoodman

Testers:

PabloGilberto , brett1479 , Olexiy , lovro

Problem categories:

String Manipulation