|
|||
True Alphabetic SortingBy a strange coincidence, nearly every spell learned at Hogwarts is an anagram of an English word or phrase that means the same thing! Professor McGonagall wants to write a dictionary for these words. Each word will be stored by its sorted anagram, meaning that the letters will be the same, but will now be in sorted order. This seems easy enough, BUT the letters aren't to be sorted in ASCII order; instead, they are to be sorted as follows: 'A', then 'a', then 'B', then 'b', and so forth. Input Specification
The input will consist of one or more words, each containing up to ten letters. The words can
be preceded, followed, and separated by any number of spaces and newline characters. The
final word will be “ Output SpecificationThe output cases are to appear in the same order in which they appear in the input. Each word is to be sorted and put into the output, each followed by a newline character. Be sure it's formatted properly; in particular, you are not to copy the white space from the input to the output. No matter how the input is formatted, you should put one word per line (as specified) in the output. Sample Input
Output for Sample Input
Original Problem |
|||
University of Debrecen; Faculty of Informatics; v. 09/30/2024 |