Amazon onsite一道题follow up求解

Find Median in a distributed system

follow up是if there are billion numbers which are distributed across multiple nodes. How will i find out the median in an efficient way.
求接怎么做

1 数的范围。
2 每台机器放了多少数,是否有序。这道题,每台机器算各自的应该没问题,就算内存不行,可以考虑外排。
3 每台机器各自二分查找(前提是有序)或快排,假设数范围是0~100,就先以50为基准,统计小于50的有多少个汇总到一台机器,去和总数比。另外,等于50的数应该有多个,统计时,也要记住。
4 二分查找会不断缩小各台机器的搜索区间,也会不断趋近最后结果。

谢谢解答!