Median in a stream of running integers (not passing even a single testcase)

@Saksham12,
*.size() returns unsigned int which gives unwanted results in arithmetic expressions. So, make a habit of explicitly converting *.size() into (int) always.

I explicitly converted. size to int but still no testcase is getting passed

@Saksham12,
Why have you commented out the second if?

Because if I don’t comment out the second if, the program is giving me error

@Saksham12,
That’s because you do not explicitly cast *.size() into (int).

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.