Unverified Commit 6f6f7f74 authored by Anatoli Papirovski's avatar Anatoli Papirovski
Browse files

lib: add internal PriorityQueue class

An efficient JS implementation of a binary heap on top of an array with
worst-case O(log n) runtime for all operations, including arbitrary
item removal (unlike O(n) for most binary heap array implementations).

PR-URL: https://github.com/nodejs/node/pull/20555
Fixes: https://github.com/nodejs/node/issues/16105


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarRuben Bridgewater <ruben@bridgewater.de>
parent a5aad244
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment