Statistics

Problem Statement for "VowelLatin"

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

  1. "XYz"

    Returns: "XYz"

    The word contains no vowels so it is unchanged by translating to Vowel Latin.

  2. "application"

    Returns: "pplctnaiaio"

    The 5 vowels in this word are all moved to the end of the word.

  3. "qwcvb"

    Returns: "qwcvb"

  4. "aeioOa"

    Returns: "aeioOa"

  5. "i"

    Returns: "i"

  6. "Y"

    Returns: "Y"

  7. "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWX"

    Returns: "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXaeiouAEIOU"

  8. "aAaAaAaAaAaAaAaAaAaAaAaAavAvaAaAaAaAaAaAaAaAaAaAaA"

    Returns: "vvaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaAaA"

  9. "Introduction"

    Returns: "ntrdctnIouio"

  10. "igPayatinLay"

    Returns: "gPytnLyiaaia"

  11. "aeIoubcdfghjklmn"

    Returns: "bcdfghjklmnaeIou"

  12. "aX"

    Returns: "Xa"

  13. "xraY"

    Returns: "xrYa"

  14. "internationalization"

    Returns: "ntrntnlztnieaioaiaio"

  15. "secRET"

    Returns: "scRTeE"

  16. "ybb"

    Returns: "ybb"

  17. "ac"

    Returns: "ca"

  18. "Ab"

    Returns: "bA"

  19. "asiasuuusds"

    Returns: "sssdsaiauuu"

  20. "nunaUUkuumkn"

    Returns: "nnkmknuaUUuu"

  21. "HOLA"

    Returns: "HLOA"

  22. "aeiouaeioaeioauaeuoiiiii"

    Returns: "aeiouaeioaeioauaeuoiiiii"


This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2024, TopCoder, Inc. All rights reserved.
This problem was used for: