Find the Running Median

  • + 1 comment

    I guess I am not understanding the question properly. We are to calculate the median after each streaming number. I am confused that we need to create heaps and store the values according. Unless we read all the data first and put the ones below median in the min-heap and the ones above the median in max heap and then pop them into a list and calcualte the medians as we do. Am I totally off. My original solution works for the first test and fails all the rest.