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

Method Swap

top_k_frequent_elements_347/solution.go:18–20  ·  view source on GitHub ↗
(i, j int)

Source from the content-addressed store, hash-verified

16 return h[i].val > h[j].val
17}
18func (h freqHeap) Swap(i, j int) {
19 h[i], h[j] = h[j], h[i]
20}
21func (h *freqHeap) Push(f interface{}) {
22 *h = append(*h, f.(freqHeapVal))
23}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected