@ashish: what if there is not sufficient memory to build hashmap? On Tue, Sep 11, 2012 at 4:19 PM, bharat b <[email protected]>wrote:
> 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 <[email protected]> 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 <[email protected]>wrote: >> >>> @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 <[email protected]> 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 <[email protected]>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 <[email protected] >>>>> > 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 [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 >>>>> 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 [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. >>>>> >>>> >>>> -- >>>> 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. >>>> >>> >>> -- >>> 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. >>> >> >> -- >> 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. >> > > -- > 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. > -- 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.
