Remix.run Logo
eru a day ago

No, it's based on soft heaps. A remarkable data structure that I recently used to prove that you can simulate a priority queue in linear time.

By simulate I mean:

You get a sequence of instructions like 'insert x' and 'delete minimum', and you want to know what's elements are left in your priority queue at the end; but you don't care about any intermediate state.

It turns out that even in the comparison model, you can answer this question in linear time in the worst case. Precisely, with no approximation.