Anagram is a word or phrase can be formed by rearranging the letters of another word or phrase. For example, carthorse is anagram of horsecars. Blanks within a phrase will be ignored. orchestra and horse cart are also anagrams.
Write a program that reads a list of phrases and print all pairs of anagram is demonstrated as follow (it will not work for upper case and lower case checking , "A" is different from "a" in the current program):
Sample input:
carthorse
horse
horse cart
I do not know u
ok i now donut
orchestra
Sample output:
carthorse = horse cart
carthorse = orchestra
horse cart = orchestra
i do not know u = ok i now donut
Please get the code and sample input file as below (there are both python and c++ version):
Is Anagram Problem
Subscribe to:
Post Comments (Atom)
Superior of partial fraction
What is complex fraction? Complex fraction is a fraction whereby its numerator or denominator or both consists of fractions. Partial frac...
-
What is fraction? Imagining you have one whole cake and you need to share the cake among you and your friends. Here come the problems, t...
-
This is a question that challenge your understand skill and programming skill. The Tremendous Tak-Tak Tree Output File: taktakout.txt T...
-
After a quite a long and challenging journey, we finally finish the training on Intermediate level book 1 to book 8. What a relieve huh ? ...
No comments:
Post a Comment