Median in Stream of Running Integers

used the same approach as discussed in solution but though my code failed the testcases.
https://ide.codingblocks.com/s/265882