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

Method Swap

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

Source from the content-addressed store, hash-verified

11 return h[i] > h[j]
12}
13func (h MaxHeap) Swap(i, j int) {
14 h[i], h[j] = h[j], h[i]
15}
16func (h *MaxHeap) Push(x interface{}) {
17 *h = append(*h, x.(int))
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected