By TopCoder* USA
Create a program to sort a set of strings by their size. Its program is to receive a set of strings and return by this same size ordered set of words, if the size of the strings are equal, must maintain the original order of the set.
The first line of input has a unique integer N that indicates the number of sets of strings, each set may contain between 1 and 50 inclusive elements, and each of the strings of the set may contain between 1 and 50 inclusive characters.
The output should contain the set of input strings ordered by the length of strings.A blank space must be printed between two words.
Sample Input | Sample Output |
4 |
midnight Coder comp Wedn Top at |