Re: [algogeeks] getting smallest 1 million numbers....

2010-06-24 Thread Amir hossein Shahriari
make a max-heap of size 1 million and insert the first 1 million numbers in it for each new number from hard disk compare it to the maximum element of the heap if it's bigger than max check next element else extract-max from heap and insert the new element the running time would be 1 trillion x lo

[algogeeks] getting smallest 1 million numbers....

2010-06-23 Thread amit
Given a set of 1 Trillion integers on hard disk, find the smallest 1 million of them. You can fit at most 1 million integers in memory at a time. State the fastest solution you can think of. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To