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

Method Push

find_median_from_data_stream_295/solution.go:37–39  ·  view source on GitHub ↗
(x interface{})

Source from the content-addressed store, hash-verified

35 h[i], h[j] = h[j], h[i]
36}
37func (h *MinHeap) Push(x interface{}) {
38 *h = append(*h, x.(int))
39}
40func (h *MinHeap) Pop() interface{} {
41 v := *h
42 p := v[len(v)-1]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected