Heap sort working for trivial example