Median of running stream - Code not working correctly

Please correct the code and add comments where correction is done.

Hello @as159925,

I would correct your code and would mention comments also.
But, I would first suggest you to go through the following code:

  1. Datatypes matter like float for median.

  2. The logic is what has been explained in the video.

If you still face issue, let me know.