Finished the heap sort.