finish Heap Sort