Problem bank

Problem 79 of 333HardCodingP079

Median of a stream

  1. Maintain the median of an unbounded stream of numbers with O(log⁡n)O(\log n) per insertion and O(1)O(1) median query.