It all depends on the distribution of words and their frequencies in the input file. But although somewhere I feel trie is better (i mean in terms of flexibility). Although a lot of pointers have to be maintained in trie , it really provides an optimal solution for this problem .
On Sat, Jul 23, 2011 at 11:08 PM, saurabh singh <[email protected]> wrote: > Hashtable o(1) trie atleast o(logn) > > > On Sat, Jul 23, 2011 at 11:05 PM, wats my name for 2day > <[email protected]>wrote: > >> @ankit, rajeev >> even I wrote hashtable as the answer .. >> >> but which would be faster? Hashtabel or Trie? >> >> -- >> 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. >> > > > > -- > Saurabh Singh > B.Tech (Computer Science) > MNNIT ALLAHABAD > > > > -- > 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. > -- Regards Rajeev N B <http://www.opensourcemania.co.cc> -- 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.
