DEV Community

Fast priority queues in Golang: Hierarchical Queue

Adrian B.G. on October 13, 2018

This article was originally published on my website https://coder.today/fast-priority-queues-in-go-hierarchical-queue-86daf6a7553a Writing O(1) ...
Collapse
 
theodesp profile image
Theofanis Despoudis

Cool. How does this compare to Pairing heaps or Fibonacci heaps?

Collapse
 
bgadrian profile image
Adrian B.G.

Those heaps have O(log n) for delete-min (dequeue), this one has constant time for every operation, but as I said in the article, it has limitations.

A Heap has to move some values around after a delete is done, as in here, you only have to popup from a queue.