mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-14 08:06:06 +00:00
Fix Go comment and link
This commit is contained in:
@@ -30,6 +30,7 @@ func (h *minHeap) Top() any {
|
||||
return (*h)[0]
|
||||
}
|
||||
|
||||
/* 基于堆查找数组中最大的 k 个元素 */
|
||||
func topKHeap(nums []int, k int) *minHeap {
|
||||
h := &minHeap{}
|
||||
heap.Init(h)
|
||||
|
||||
Reference in New Issue
Block a user