Problem 295 · Hard

Find Median from Data Stream

Maintain a max-heap for the lower half and a min-heap for the upper half, balancing sizes after each insert.

Open the interactive visualisation