Find the median of an unsorted stream of integers at any given time

An unsorted integer stream is coming, we need to always keep the median of all the stream elements. The median can be defined as follows. To find the median of any given array, Sort the array Find integer(s) in the middle of the sorted array The average of middle these integers is median ( IfRead More »