s******d 发帖数: 61 | 1 You have 100 files, each containing 10G sorted integers. How to merge all
integers into one sorted file?
这题以前见过,现在又没思路了...求解 | j*********7 发帖数: 25 | | f*******t 发帖数: 7549 | | s******d 发帖数: 61 | 4 我查了下counting sort, 用另外的数组来存原数组元素排序后的位置, 但是只单个数
组的排序, 不清楚怎么应用到这里? | s*****y 发帖数: 897 | 5 为什么一般用counting sort好呢,我以为一般都用merge sort。
counting sort的话你要知道所有数字的range 和ram的大小,能够把所有的counter
hold在ram里面才行。
【在 f*******t 的大作中提到】 : 正好这帖里有: : http://www.mitbbs.com/article_t/JobHunting/31909771.html : 一般情况下用counting sort比较好
|
|