Median in a stream of running integers

none of the test cases is passing?
what’s wrong with the code?