sort the list,sort the word(use quick sort(nlogn  time))- and den search
using binary search(logn time)
or we can evn do by hashing-hash the word,den for every word keep
decreasing the counter,if the hash array is zero ,anagram,else reset the
hash array for given input for the checking the next word.

On Wed, Jul 18, 2012 at 2:07 AM, Navin Kumar <algorithm.i...@gmail.com>wrote:

> Assuming a preexisting list of 100 words, how would you efficiently see if
> a word received from input is an anagram of any of the 100 words?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/5kuxjymYEc4J.
> 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.
>



-- 
Vindhya Chhabra

-- 
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.

Reply via email to