HeapSort Callback version