Design a Data Structure for Median of a Stream
DSA
Medium
18 views
Problem Description
Design a data structure that continuously receives numbers from a data stream and returns the median at any time. Explain how two heaps can be used to balance the elements and compute the median efficiently.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!