[algogeeks] Finding frequent words

2011-11-29 Thread kumar raja
You get a stream of words, find top m frequent words. What are all the possible approaches for this problem ?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
Splay trees On Tue, Nov 29, 2011 at 10:07 PM, kumar raja rajkumar.cs...@gmail.comwrote: You get a stream of words, find top m frequent words. What are all the possible approaches for this problem ?? -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You

Re: [algogeeks] Finding frequent words

2011-11-29 Thread kumar raja
@Anup: How splay trees come into picture here?? I think TRIE or Hashtable will work out. But it is difficult to conceive the TRIE solutions and explain it to the Interviewer .so i am looking for something else better and concrete one. On 29 November 2011 08:50, Anup Ghatage ghat...@gmail.com

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
Splay Trees are self modifying trees. Upon the frequency of an element it's not is brought up closer to the root. So in a continuous stream of words, every word is inserted as a node, if it is already present the score of that node is increased and the tree is modified, over a period of time, the

Re: [algogeeks] Finding frequent words

2011-11-29 Thread Anup Ghatage
Correction: Upon the frequency of an element it's BROUGHT UP closer to the root. On Wed, Nov 30, 2011 at 6:39 AM, Anup Ghatage ghat...@gmail.com wrote: Splay Trees are self modifying trees. Upon the frequency of an element it's not is brought up closer to the root. So in a continuous stream