Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/austingebauer/go-leetcode
/ Pop
Method
Pop
top_k_frequent_elements_347/solution.go:24–29 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
22
*h = append(*h, f.(freqHeapVal))
23
}
24
func
(h *freqHeap) Pop()
interface
{} {
25
heapV := *h
26
p := heapV[len(heapV)-1]
27
*h = heapV[0 : len(heapV)-1]
28
return
p
29
}
30
31
// Time: O(n)
32
// Space: O(n)
Callers
1
topKFrequent
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected