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

Struct MedianFinder

find_median_from_data_stream_295/solution.go:47–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47type MedianFinder struct {
48 // keep the smaller half of numbers in a max heap for O(1) access to middle
49 smallerHalf *MaxHeap
50
51 // keep the larger half of numbers in a min heap for O(1) access to middle
52 largerHalf *MinHeap
53}
54
55/** initialize your data structure here. */
56func Constructor() MedianFinder {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected