@Ashish: According to your algo making multimap itself takes O(mn) time complexity (preprocessing). After then getting anagram of a string takes O(n) time. Am i right?
On Thu, Aug 23, 2012 at 6:51 AM, Ashish Goel <ashg...@gmail.com> wrote: > O(n) > convert each string into format a1b2....and then insert into multimap > wityh this a1b2...as key and original word as value. All words with same > key are anagrams > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > > On Wed, Aug 22, 2012 at 11:39 PM, GAURAV CHAWLA > <togauravcha...@gmail.com>wrote: > >> Ques.. >> >> Given a m-word dictionary ... and a n-sized word... .. now suggest DS for >> dictionary such that you can find out all the anagrams of the given word >> present in dictionary... >> >> >> -- >> Regards, >> G C >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Algorithm Geeks" group. >> To post to this group, send email to algogeeks@googlegroups.com. >> To unsubscribe from this group, send email to >> algogeeks+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/algogeeks?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To post to this group, send email to algogeeks@googlegroups.com. > To unsubscribe from this group, send email to > algogeeks+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.