updated heap's extractMin and sort