Design a Data Structure for Median of a Stream

DSA Medium 18 views
Back to Questions

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!

Discussion (0)

No comments yet. Start the discussion!

Prev Next