First version of the median heap