heap sort (classic) finished