Heap Sort Optimization in Blueprint

I was following a tutorial someone made for Unity to create an A*Pathfinding - and I was successful so far. The pathfinding itself works flawlessly. But the performance…

Then I tried the heap sort optimization. And while I understand the theory, I must admit it’s too complicated to translate whatever he’s doing in C# into a BP workable format.

Maybe someone can help me understand what he’s doing and show me how it’s done in BP.