Median in a stream of running integers

i have written my logic clearly and right. but please check why its printing is not correct


this should be declared outside while loop… but u were doing opposite… rest ur code is fine… ur corrected code https://ide.codingblocks.com/s/610757

also ur some of prev doubts are still active… kindly wrap them up if they are resolved…

please check this code. its not getting submitted

https://ide.codingblocks.com/s/611523 i have corrected ur code…
there were 2 things… firstly median should be int not float… secondly u were taking input d outside the while loop twice due to which it was failing on multiple test cases…

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.