Given billions of unsorted numbers and we need to find first 1 million numbers if all the numbers were sorted in non-descending order. approach is to split up the numbers to multiple machines and sort them. Then make a tournament tree in such a way that each machine feeds the lowest number it has, to the tree. After all the machines have fed their lowest number, the tree outputs the minimum number which goes to the output. This number say came from i th machine. Now the next number to the tree is fed by this ith machine only. Repeat the above process for getting the 1st million numbers.
Now someone plz explain how to code this? -- 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.