TopCoder problem "LetterSort" used in SRM 2 (Division I Level Two , Division II Level Two)



Problem Statement

    
Implement a class LetterSort, which contains a method doSort.  doSort takes a
String as a parameter and sorts the characters in the string in order of their
first appearance in the string.  For example CABCACCB sorts to CCCCAABB.  The
method doSort should return the sorted String.

The method signature is:
public String doSort(String input);

input is a string of at least 1 character and at most 50 characters.  The
characters are letters or numbers.

Note:
-The sort is case sensitive.  "A" is a different character than "a".

Examples:
If input="TopCoder", the method returns "ToopCder"
If input="HiHowAreYou", the method returns "HHioowAreYu"
 

Definition

    
Class:LetterSort
Method:doSort
Parameters:String
Returns:String
Method signature:String doSort(String param0)
(be sure your method is public)
    

Problem url:

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

Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=3001&pm=56

Writer:

Unknown

Testers:

Problem categories: