Skip to main content

Posts

Showing posts with the label Ana-gram

AnaGram-Data Structure

An anagram  is a rearrangement of the letters in either a word or a phrase (using each letter exactly once in the word or phrase created).  Ideally the anagram created relates in some (perhaps humorous) way to the original word or phrase. Such anagrams are described as   cognate . The best anagrams are grammatically correct and use techniques such as abbreviating   and  to   'n'   only minimally. I have Developed an anagram program in VS 2010 using vc++, this program read one input string at a time and produce all anagrams of that string. Input string should include all unique chars not repeated one like "caat" . I have Developed this program using stack and queue data structure.  This Program will give you basic idea of anagram, you may modify it as per your requirement. #include #include #include #include #define MAX 10 using namespace std; typedef struct { char arr[20]; in...