排序算法的运行时间为O(n),并进行排序到位
问题描述:
有已运行 O(n)的时间
,并在排序位置?任何排序算法
Is there any sorting algorithm which has running time of O(n)
and also sorts in place?
答
没有。
目前已探明下界为O(n log n)的一般分类。
There's proven lower bound O(n log n) for general sorting.
基数排序是基于了解数据的数值范围内,但这里实际上提到的就地基数排序需要多张通行证为真实世界的数据。
Radix sort is based on knowing the numeric range of the data, but the in-place radix sorts mentioned here in practice require multiple passes for real-world data.