// 堆排 func heapSort(nums []int) { n := len(nums) if n < 2 { return } lastParent := (n - 2) / 2 for i := lastParent; i >= 0; i-- { pushDown(nums, i, n) ...
// 堆排 func heapSort(nums []int) { n := len(nums) if n < 2 { return } lastParent := (n - 2) / 2 for i := lastParent; i >= 0; i-- { pushDown(nums, i, n) ...