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

Method Less

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

Source from the content-addressed store, hash-verified

13 return len(h)
14}
15func (h freqHeap) Less(i, j int) bool {
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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected