MCPcopy
hub / github.com/austingebauer/go-leetcode / Push

Method Push

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

Source from the content-addressed store, hash-verified

14 h[i], h[j] = h[j], h[i]
15}
16func (h *MaxHeap) Push(x interface{}) {
17 *h = append(*h, x.(int))
18}
19func (h *MaxHeap) Pop() interface{} {
20 v := *h
21 p := v[len(v)-1]

Callers 1

AddNumMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected