排序数组列表的最佳算法?

时间:2018-11-06 22:20:53

标签: algorithm

因此,我每个分类数据有5个块(比方说2000个项目)。是否有一种算法可以利用此属性来优化对全部10,000个项目的排序?

1 个答案:

答案 0 :(得分:0)

什么都不知道,但是您可以列出每个块的最小块,即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.