Hacker News new | ask | show | jobs
by Xcelerate 699 days ago
No, I mean median. Here is an article describing a very similar problem since I can’t link to the leetcode version: https://www.geeksforgeeks.org/median-of-stream-of-running-in...
3 comments

> Auxiliary Space : O(n).

> The Space required to store the elements in Heap is O(n).

I don't think this algorithm is suitable for trillions of items.

I'm wondering what heap approach can solve that problem, as I can't think of any. Hopefully OP got a link to the thesis.

The n log n approach definitely works though.

But that stores all elements into memory?