算法导论 第八章箱子排序(bucket sort)

BUCKET-SORT(A)
1  n  length[A]
2  for i  1 to n
3     do insert A[i] into list B[n A[i]]
4  for i  0 to n - 1
5     do sort list B[i] with insertion sort
6  concatenate the lists B[0], B[1], . . ., B[n - 1] together in order
posted @ 2011-02-21 14:25  SunnyDay2015  阅读(279)  评论(0编辑  收藏  举报