Use Max - heap of size K. On Wed, Mar 16, 2011 at 10:36 AM, DIPANKAR DUTTA <[email protected] > wrote:
> use heap tree to slove this.. > plz see careercup post.. > > > On Wed, Mar 16, 2011 at 10:31 AM, Ankit Sinha <[email protected]> wrote: > >> Asked in Amazon interview.. >> >> Find the first K smallest element from 1 million sized array . Assume >> your ram memory is so small that it cannot accommodate all 1 Million >> element at once. >> Guys provide your inputs on the same... >> >> Thanks, >> Ankit!!!! >> >> -- >> 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. >> >> > > > -- > DIPANKAR DUTTA > M-TECH,Computer Science & Engg. > E&C Dept,IIT ROORKEE > Uttarakhand , India – 247667 > ------------------------------------------- > website:http://people.iitr.ernet.in/shp/09535009/Website/index.html > ph no-09045809987 > Lab: 286454 > email:[email protected] > > -- > 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.
