Question: Consider the online median problem: we are given a stream of integers (for simplicity assume that they are all distinct). On reading the i th

Consider the online median problem: we are given a stream of integers (for simplicity assume that they are all distinct). On reading the i th input integer, we are required to quickly output the median of the i integers we have seen so far. Design and analyze an efficient algorithm that can compute the median of the current stream as soon as a new number in the stream appears.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!