This commit is contained in:
krahets
2023-06-25 21:11:35 +08:00
parent 5bc8df6d5d
commit e4e6cd6bae
19 changed files with 836 additions and 105 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ comments: true
=== "Go"
```go title="my_heap.go"
/* 构造方法,根据切片建堆 */
/* 构造函数,根据切片建堆 */
func newMaxHeap(nums []any) *maxHeap {
// 将列表元素原封不动添加进堆
h := &maxHeap{data: nums}