@Abhishek +1 On Wed, Jul 18, 2012 at 11:19 PM, Abhishek Sharma <abhi120...@gmail.com>wrote:
> sort each word in the list,then sort the whole list. > Now,sort the input word(string). > and then use binary search to find the word. > > > On Wed, Jul 18, 2012 at 8:59 PM, Bhupendra Dubey > <bhupendra....@gmail.com>wrote: > >> Sort each of the word and form a trie , if any words comes again you get >> one sch case. >> >> >> On Wed, Jul 18, 2012 at 2:12 PM, vindhya chhabra < >> vindhyachha...@gmail.com> wrote: >> >>> yes,sorry count sort will be O(n) so better.thanks >>> >>> On Wed, Jul 18, 2012 at 1:43 PM, saurabh singh <saurab...@gmail.com>wrote: >>> >>>> ^sorting a string would be o(n^2logn) if u use q.sort.count sort would >>>> be better. >>>> Saurabh Singh >>>> B.Tech (Computer Science) >>>> MNNIT >>>> blog:geekinessthecoolway.blogspot.com >>>> >>>> >>>> >>>> On Wed, Jul 18, 2012 at 1:08 PM, vindhya chhabra < >>>> vindhyachha...@gmail.com> wrote: >>>> >>>>> 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. >>>>> >>>> >>>> -- >>>> 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. >>>> >>> >>> >>> >>> -- >>> 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. >>> >> >> >> >> -- >> Thanks & regards >> Bhupendra >> >> >> >> -- >> 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. >> > > > > -- > Abhishek Sharma > Under-Graduate Student, > PEC University of Technology > > -- > 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.