Re: [algogeeks] Finding top 10 most frequent repeated word
@ashish: will you use HashMap or any other mapping technique? please throw some light on map? On Tue, Sep 11, 2012 at 11:09 AM, Ashish Goel ashg...@gmail.com wrote: map + heap for 10 most occurred words.. external sort for not sufficient memory if the words are dynamically added/deleted, the first map+heap should succeed. Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sat, Sep 8, 2012 at 8:06 PM, Kumar Vishal kumar...@gmail.com wrote: if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.comwrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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. -- 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.
Re: [algogeeks] Finding top 10 most frequent repeated word
hashmap for word to count mapping and a heap will have count and corresponding words (will get updated at run time) Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Sep 11, 2012 at 2:07 PM, Navin Kumar algorithm.i...@gmail.comwrote: @ashish: will you use HashMap or any other mapping technique? please throw some light on map? On Tue, Sep 11, 2012 at 11:09 AM, Ashish Goel ashg...@gmail.com wrote: map + heap for 10 most occurred words.. external sort for not sufficient memory if the words are dynamically added/deleted, the first map+heap should succeed. Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sat, Sep 8, 2012 at 8:06 PM, Kumar Vishal kumar...@gmail.com wrote: if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.comwrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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. -- 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.
Re: [algogeeks] Finding top 10 most frequent repeated word
but in the question it says that billions of words .. I don't think using hashmap is good idea .. On Tue, Sep 11, 2012 at 2:34 PM, Ashish Goel ashg...@gmail.com wrote: hashmap for word to count mapping and a heap will have count and corresponding words (will get updated at run time) Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Sep 11, 2012 at 2:07 PM, Navin Kumar algorithm.i...@gmail.comwrote: @ashish: will you use HashMap or any other mapping technique? please throw some light on map? On Tue, Sep 11, 2012 at 11:09 AM, Ashish Goel ashg...@gmail.com wrote: map + heap for 10 most occurred words.. external sort for not sufficient memory if the words are dynamically added/deleted, the first map+heap should succeed. Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sat, Sep 8, 2012 at 8:06 PM, Kumar Vishal kumar...@gmail.com wrote: if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.comwrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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. -- 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. -- 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.
Re: [algogeeks] Finding top 10 most frequent repeated word
@ashish: what if there is not sufficient memory to build hashmap? On Tue, Sep 11, 2012 at 4:19 PM, bharat b bagana.bharatku...@gmail.comwrote: but in the question it says that billions of words .. I don't think using hashmap is good idea .. On Tue, Sep 11, 2012 at 2:34 PM, Ashish Goel ashg...@gmail.com wrote: hashmap for word to count mapping and a heap will have count and corresponding words (will get updated at run time) Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Tue, Sep 11, 2012 at 2:07 PM, Navin Kumar algorithm.i...@gmail.comwrote: @ashish: will you use HashMap or any other mapping technique? please throw some light on map? On Tue, Sep 11, 2012 at 11:09 AM, Ashish Goel ashg...@gmail.com wrote: map + heap for 10 most occurred words.. external sort for not sufficient memory if the words are dynamically added/deleted, the first map+heap should succeed. Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sat, Sep 8, 2012 at 8:06 PM, Kumar Vishal kumar...@gmail.comwrote: if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.com wrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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. -- 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. -- 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.
Re: [algogeeks] Finding top 10 most frequent repeated word
map + heap for 10 most occurred words.. external sort for not sufficient memory if the words are dynamically added/deleted, the first map+heap should succeed. Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Sat, Sep 8, 2012 at 8:06 PM, Kumar Vishal kumar...@gmail.com wrote: if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.comwrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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.
Re: [algogeeks] Finding top 10 most frequent repeated word
if it can be loaded we can use map , else look for external sorting coming to second point it dynamically changing leads lot of other questions before going give algo . On Sat, Sep 8, 2012 at 7:43 PM, Navin Kumar algorithm.i...@gmail.comwrote: Given a file which has billions of words and file can be loaded in memory. Now find 10 most frequent words in file. What if file is dynamically changing means words are continuously added to it. What if file cant be loaded in memory. -- 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/-/UcdJKQHPGzoJ. 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. -- Regards Kumar Vishal _ *http://wethecommonpeople.wordpress.com/ * *h**ttp://kumartechnicalarticles.wordpress.com/http://kumartechnicalarticles.wordpress.com/ * _ -- 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.