Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/neetcode-gh/leetcode
/ average
Method
average
javascript/0295-find-median-from-data-stream.js:45–47 ·
view source on GitHub ↗
(maxHeap, minHeap)
Source
from the content-addressed store, hash-verified
43
}
44
45
average(maxHeap, minHeap) {
46
return
(this.top(maxHeap) + this.top(minHeap)) / 2;
47
}
48
49
top(heap) {
50
return
heap.front()?.element || 0;
Callers
1
findMedian
Method · 0.95
Calls
1
top
Method · 0.95
Tested by
no test coverage detected