295. Find Median from Data Stream
Solutions
- Keep 2 heap, one min_heap and one max_heap
- Let min_heap has at most 1 item more than max_heap
- The tops of two heaps will be the median of the whole list.
PREVIOUSSelf-Stabilization
NEXTInsert Interval
295. Find Median from Data Stream