I am quite new to javascript and currently I am working on a problem where I need a min priority queue with decrease key and extract min operation. This is just a part of the problem so I was wondering if there is any resource with such library.
Also the link that I am getting after search is on node.js, but I am hesitant to use it since I am pretty new to js and have no knowledge about node.js.
Is it the case that I have to build both the priority queue and binary heap from scratch myself for js?
I would appreciate any help.
EDIT:
decrease key operation is a standard operation that decreases the priority of some existing element of queue. It should be an O(log N) operation with binary heap.