take an array of 10 ,travese the whole rcord and apply min heap on these 10 elements. as like first 10 no will be there and we apply minheap so we will get minimun num in these 10 number..If next numbe is greater then minimun no in array ..we will replace it and apply minheap ...
On Thu, Feb 17, 2011 at 11:12 AM, Jammy <[email protected]> wrote: > Divide records into parts that could fit into main memory. Do rank > find algorithm for certain range if necessary. > > On Feb 16, 7:26 pm, bittu <[email protected]> wrote: > > given a very large file (millions of record), find the 10 largest > > numbers from it.in minimum time complexity > > Don't think about hashing . Again Its Flat File Not the Database > > > > Thanks & Regards > > Shashank Mani > > -- > 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.
