whats wrong with my code it gives correct output for custom test cases but doesnt pass any of the test cases
Https://ide.codingblocks.com/s/325631
Hey @sauravzt7
Your code is absolutely correct but you only have to integer part of med (its the requirement of the question)
Question was : “You are given a running data stream of n integers. You read all integers from that running data stream and find effective median of elements read so far in efficient way. All numbers are unique in the datastream. Print only the integer part of the median.”
i didnt get what only integer part means can you give me one example ??
Say we have 2 nos
1 2 in stream
So for 1 you will print 1 but for 1&2 you are printing 1.5 but u have to print 1(i.e only integer part)