Problem I. 130. (April 2006)
I. 130. Write your program to find anagrams in a given text. An anagram of a word is formed by rearranging its letters arbitrarily, as in earth and heart.
The name of the input and output text file is specified as the first and second parameter: for example, if we want to collect all anagrams of text.txt into anagrams.txt, then the following command is issued
i130.exe text.txt anagrams.txt
The input file contains at most 1000 words in some lines and separated by spaces. Each word has at most 30 letters without any special characters. Lower and upper case letters are considered the same.
Each line of the output file should contain a group of anagrams separated by spaces. The words are listed in alphabetic order in each group, and groups containing more words come first.
See the example.
The source code (i130.pas, i130.cpp, ...) is to be submitted.
Deadline expired on 15 May 2006.
Sorry, the solution is available only in Hungarian. Google translation