News for hackers. Stuff that matters.
Re:Ask HN: What are some cool but obscure data structures yo... by cdelahousse on Friday July 22, 2022 @03:53PM (#32196379)
Min-Max Heaps

Think of them as double ended priority queues. O(n) construction with O(lgN) mutations. Both the min and max elements are quick to get O(1).

The paper is short and the data structure is elegant. I read it a few years ago in uni and made me appreciate how greatly useful can be implemented very simply.

https://dl.acm.org/doi/pdf/10.1145/6617.6621

There are no comments on this comment yet.