选择排序
原文英文,约500词,阅读约需2分钟。发表于: 。Straight Sort- Comparison based Algorithm that swaps minimum element in place to achieve a T(C) = O(n^2) _ and a _S(C) = O(1) as the swapping occurs in place. Steps- Start with the...
选择排序和堆排序是常见的排序算法。选择排序通过交换最小元素实现O(n^2)的时间复杂度和O(1)的空间复杂度;堆排序利用二叉堆,时间复杂度为O(nlogn),空间复杂度同样为O(1)。