Get Time

   Problem Statement  

 Problem Statement for NamingConvention

Problem Statement

    In most programming languages variable names cannot contain spaces. If we want a variable name that consists of two or more words, we have to encode the spaces somehow. In this problem, we will look at two ways of doing so: Snake Case and Camel Case. When using Snake Case, we just replace each space by an underscore ('_'). When using Camel Case, we capitalize the first letter of each word except for the first one, and then we remove all spaces.

For example, suppose that we want to declare a variable called "good morning world" (quotes for clarity). In Snake Case, we would write this variable as "good_morning_world", while in Camel Case it would be "goodMorningWorld".

You are given a String variableName. This String contains a valid variable name written in Snake Case. Return the same variable name in Camel Case.


Method signature:String toCamelCase(String variableName)
(be sure your method is public)


-variableName will contain between 1 and 50 characters.
-Each character of variableName will be 'a'-'z' or '_'.
-The first and last character of variableName will not be '_'.
-variableName will not contain two consecutive underscores ('_').


Returns: "sumOfTwoNumbers"
We have 4 words: "sum", "of", "two", "numbers". So the answer is "sum" + "Of" + "Two" + "Numbers".
Returns: "variable"
Note that if we have only 1 word, then the varaible name will remain same.
Returns: "tOPCODER"
Returns: "theVariableNameCanBeVeryLongLikeThis"

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)2010, TopCoder, Inc. All rights reserved.

This problem was used for:
       Single Round Match 638 Round 1 - Division II, Level One