Meadian in a stream of runninig integers

all of my custom outputs are coming right as the question doesnt mentions how to output it i dont know is there any problem with the code or the way output should be
this is the ide

use int instead of float
because it is not mention in question to print ans in decimal

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:

ohh thanks but 2 cases are still showing TLE

what should be the more optimised way to do this??

code is optimised and correct only one change should be done


here equal to should be added

Modified Code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like and don’t forgot to mark doubt as resolved :grinning:

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.