By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,797 Members | 1,848 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,797 IT Pros & Developers. It's quick & easy.

annaram of word from dictionary

P: n/a
We have a table which has all words and their meaning of
dictionary in it.you are given a word and now find all anagram of that
word and their meaning as well.annagram means like we have word top
then pot is one anngram.

can u suggest me a best optimal algorithms for this

Jun 7 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
<pa********@gmail.comwrote:
We have a table which has all words and their meaning of
dictionary in it.you are given a word and now find all anagram of that
word and their meaning as well.annagram means like we have word top
then pot is one anngram.

can u suggest me a best optimal algorithms for this
Would you settle for _an_ algorithm instead of best optimal? Besides that,
"best optimal" sounds like there should be only one algorithm, not several.

I would think about putting the dictionary in a tree and using
next_permutation() in <algorithmfor the input data, such as "top".
Jun 7 '07 #2

P: n/a
pa********@gmail.com wrote:
We have a table which has all words and their meaning of
dictionary in it.you are given a word and now find all anagram of that
word and their meaning as well.annagram means like we have word top
then pot is one anngram.

can u suggest me a best optimal algorithms for this
Read the FAQ 5.2 and the rest of section 5.
Jun 7 '07 #3

P: n/a
On 7 Jun, 16:28, pangamu...@gmail.com wrote:
We have a table which has all words and their meaning of
dictionary in it.you are given a word and now find all anagram of that
word and their meaning as well.annagram means like we have word top
then pot is one anngram.

can u suggest me a best optimal algorithms for this
C++ algorithms live in the <algorithmheader. Each anagram is a
different permutation of the letters in the original word and
<algorithmprovides std::next_permutation.

The FAQ explains how to get help with code you are trying to write.

http://www.parashift.com/c++-faq-lit...t.html#faq-5.8

Gavin Deane

Jun 7 '07 #4

P: n/a
pa********@gmail.com wrote:
We have a table which has all words and their meaning of
dictionary in it.you are given a word and now find all anagram of that
word and their meaning as well.annagram means like we have word top
then pot is one anngram.

can u suggest me a best optimal algorithms for this
Also, look in your table for the correct spelling of anagram. You wrote
it four times, each with a different spelling.

--
Regards
Miguel Giménez
Jun 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.