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...
-
The name of computer is named by the word "compute". Basically the role of computer cannot be fulfilled without compute. Okay....
-
In order to store a set of variable, we use a list. A list can be illustrated as a box queue in a line, and we add our value to each box. ...
No comments:
Post a Comment