MCPcopy Create free account
hub / github.com/austingebauer/go-leetcode / Push

Method Push

top_k_frequent_elements_347/solution.go:21–23  ·  view source on GitHub ↗
(f interface{})

Source from the content-addressed store, hash-verified

19 h[i], h[j] = h[j], h[i]
20}
21func (h *freqHeap) Push(f interface{}) {
22 *h = append(*h, f.(freqHeapVal))
23}
24func (h *freqHeap) Pop() interface{} {
25 heapV := *h
26 p := heapV[len(heapV)-1]

Callers 1

topKFrequentFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected