KAryHeap optimized