Just another Hackerrank problem about calculating running medians.
I have done it by using Counting Sort and calculating the bin in the frequency table where the median lies.
I believe this solution to run in linear time O(n).
Hackerrank sorting problem
Just another Hackerrank problem about calculating running medians.
I have done it by using Counting Sort and calculating the bin in the frequency table where the median lies.
I believe this solution to run in linear time O(n).
Hackerrank sorting problem