Question: Please write a program to sort string. The rule of order as follow. cook greater the book javascript greater then java Input The first line
Please write a program to sort string.
The rule of order as follow.
cook greater the book
javascript greater then java
Input
The first line of input content an integer n (n
For next n line, each line content a string with only lower case letter.
Length of every string is less than 50.
output
Output a string for a line inascending order.

Sample Input 1 ) Sample Output 1 5 look book book cook java javascript look cook javascript java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
