Comment Comment by lunaticd i did it does a ton of allocations, which is why i made a simple maxheap implementation and then sort the final result parent lunaticd 2 years ago