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
Get step-by-step solutions from verified subject matter experts
