【发布时间】:2018-11-06 22:20:53
【问题描述】:
所以我有 5 个块(假设大小为 2000 个项目)每个排序数据。有没有一种算法可以利用这个属性来优化对整个 10,000 个项目的排序?
【问题讨论】:
-
有点搞砸了这个名字。我只是以最快的方式将几个排序的数组一起排序成一个大的排序数组
标签: algorithm
所以我有 5 个块(假设大小为 2000 个项目)每个排序数据。有没有一种算法可以利用这个属性来优化对整个 10,000 个项目的排序?
【问题讨论】:
标签: algorithm
不知道,但你可以列出每个块的最小元素,即 5 个元素,记住它们来自哪个块。
Then sort them.
Remove the smallest and add to the result
Take the next smallest from the list that the smallest was from and place it in the correst sorted position.
【讨论】: