Here’s my code fro finding median in a stream of running integers. I think the logic is correct but I am still not getting desired output.
Median in a stream of running integers
hello @div_yanshu07 i have corrected your code and now it is printing the correct result .
but there are still some error like you should declare the median as int type as it is mentioned in the question .
and you should use the array for input .
the perfect code is :
if you feel that your doubt is cleared please mark this doubt as cleared .
Happy Learning !!
Both of them are not passing any test case on submitting.
@div_yanshu07 where are you submitting ?
i have tried submitting on hackerblocks and the second code was passing every test case.
Yeah, I am submitting on hackerblocks only.
try to submit second code it will definitely pass every test case.
i have updated again .
Now it works! ThankYou!