tool.heepSort

2023/11/29

堆排序是指利用堆这种数据结构所设计的一种排序算法,其时间复杂度是 O(nlog n),为不稳定排序。

heepSort(arr: number[]): number[]

# 示例

tool.heepSort([4, 1, 3, 2, 16, 9, 10, 14, 8, 7]); // [1, 2, 3, 4, 7, 8, 9, 10, 14, 16]
1
更新时间: 2023/11/29 15:42:16