max heap completed