Problem Statement | |||||||||||||
You recently asked your secretary to put some box files into storage for you. He was supposed to sort them with the names of the files in lexicographical order, but an error with the printer caused the names to be printed with the characters in reverse order and he sorted them based on the printed names. You want to know what order the files ended up in.
You will be given the original names of the files in a String[] files. Return a String containing the original name of the first file in the order your secretary sorted them. | |||||||||||||
Definition | |||||||||||||
| |||||||||||||
Constraints | |||||||||||||
- | files will contain between 1 and 50 elements, inclusive. | ||||||||||||
- | Each element of files will contain between 1 and 50 characters, inclusive. | ||||||||||||
- | files will contain only uppercase letters ('A'-'Z'). | ||||||||||||
Examples | |||||||||||||
0) | |||||||||||||
| |||||||||||||
1) | |||||||||||||
| |||||||||||||
2) | |||||||||||||
| |||||||||||||
3) | |||||||||||||
| |||||||||||||
4) | |||||||||||||
|