find medians by using minimum and maxmimum heap