如何最好地描述 TreeSort 和 HeapSort 算法是什么?

How does one best describe what the TreeSort and HeapSort algorithms are?

我已通读维基页面和其他 Whosebug 答案。希望有人能解释一下这两种算法的作用

谢谢

Treesort 使用在二叉搜索树 (BST) 上执行的中序遍历。构建 n 项的 BST 需要 O(n * depth of tree) = O(n * log n) 时间。

Heapsort 的工作原理是最大的项目存储在堆的根部。构建一堆 n 项需要 O(n * each_heapify_TimeComplexity) = O(n * log n) 时间。

对于螺旋树结构,Treesort 的 TC 将为 O(n^2)。虽然 Heapsort 在这个角度上是 不同的 ,因为它通过将自身塑造成完整的二叉树来将深度保持在最小可能值。