()
| 38 | *h = append(*h, x.(int)) |
| 39 | } |
| 40 | func (h *MinHeap) Pop() interface{} { |
| 41 | v := *h |
| 42 | p := v[len(v)-1] |
| 43 | *h = v[0 : len(v)-1] |
| 44 | return p |
| 45 | } |
| 46 | |
| 47 | type MedianFinder struct { |
| 48 | // keep the smaller half of numbers in a max heap for O(1) access to middle |
nothing calls this directly
no outgoing calls
no test coverage detected