by Xcelerate · 2y ago · 0 comments
> The Space required to store the elements in Heap is O(n).
I don't think this algorithm is suitable for trillions of items.
The n log n approach definitely works though.