Use Product of Primes as Hash function , this would give no collision in case of anagrams.
On Tue, May 17, 2011 at 9:53 PM, Anand <[email protected]> wrote: > For any given word. > - Find the lexicographic ordering and calculate it hash. > - Find all permutation of the string > - Check each permutation if it's a valid word > - if so store it at the same hash index. > > > > On Tue, May 17, 2011 at 7:16 AM, Ashish Goel <[email protected]> wrote: > >> hash.. >> >> Best Regards >> Ashish Goel >> "Think positive and find fuel in failure" >> +919985813081 >> +919966006652 >> >> >> On Tue, May 17, 2011 at 11:36 AM, Piyush Sinha >> <[email protected]>wrote: >> >>> Given an English word in the form of a string, how can you quickly >>> find all valid >>> anagrams for that string (all valid rearrangements of the letters that >>> form valid >>> English words)? >>> -- >>> *Piyush Sinha* >>> *IIIT, Allahabad* >>> *+91-8792136657* >>> *+91-7483122727* >>> *https://www.facebook.com/profile.php?id=100000655377926 * >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Algorithm Geeks" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> 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 [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > -- Amit Jaspal. Men do less than they ought, unless they do all they can -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
