Finished heapsort.