Median of a running stream

not getting correct output

@Megha2468,
Your code gives wrong answer on sample test case itself, you should dry run to find out where your code goes wrong.