PROBLEM STATEMENT
You are given a String consisting of lower-case letters. Sort the characters
within that String in ascending alphabetical order, and return the resulting
String. For example, if you are given the String "dbcba", you would re-arrange
the letters to form the String "abbcd".
DEFINITION
Class: StringSort
Parameters: String
Returns: String
Method signature (be sure your method is public): String sort(String str);
INPUT CONSTRAINTS
TopCoder will verify that all input constraints are met.
- str will contain between 0 and 50 characters, inclusive.
- str will contain only lower-case letters (a-z).
EXAMPLES:
str: "pickle"
Returns: "ceiklp"
str: "abhor"
Returns: "abhor"
str: "sortthisstring"
Returns: "ghiinorrsssttt"
str: "tesla"
Returns: "aelst"
str: ""
Returns: ""