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...
-
Please click on the link to get the full question. Sitting or Standing ? Input File: sitin.txt Output File: sitout.txt Time L...
-
The name of computer is named by the word "compute". Basically the role of computer cannot be fulfilled without compute. Okay....
No comments:
Post a Comment