Fix Go comment and link

This commit is contained in:
krahets 2023-07-24 13:11:00 +08:00
parent 9ab4b0b15c
commit 1777a16865
4 changed files with 5 additions and 4 deletions

View file

@ -30,6 +30,7 @@ func (h *minHeap) Top() any {
return (*h)[0] return (*h)[0]
} }
/* 基于堆查找数组中最大的 k 个元素 */
func topKHeap(nums []int, k int) *minHeap { func topKHeap(nums []int, k int) *minHeap {
h := &minHeap{} h := &minHeap{}
heap.Init(h) heap.Init(h)

View file

@ -256,7 +256,7 @@ $$
=== "Go" === "Go"
```go title="climbing_stairs_dfs_mem.go" ```go title="climbing_stairs_dfs_mem.go"
[class]{}-[func]{dfs} [class]{}-[func]{dfsMem}
[class]{}-[func]{climbingStairsDFSMem} [class]{}-[func]{climbingStairsDFSMem}
``` ```

View file

@ -58,7 +58,7 @@
=== "Go" === "Go"
```go title="fractional_knapsack.go" ```go title="fractional_knapsack.go"
[class]{}-[func]{II} [class]{Item}-[func]{}
[class]{}-[func]{fractionalKnapsack} [class]{}-[func]{fractionalKnapsack}
``` ```

View file

@ -87,7 +87,7 @@
=== "Go" === "Go"
```go title="top_k.go" ```go title="top_k.go"
[class]{maxHeap}-[func]{topKHeap} [class]{}-[func]{topKHeap}
``` ```
=== "JavaScript" === "JavaScript"
@ -105,7 +105,7 @@
=== "C" === "C"
```c title="top_k.c" ```c title="top_k.c"
[class]{maxHeap}-[func]{topKHeap} [class]{}-[func]{topKHeap}
``` ```
=== "C#" === "C#"