1.0.1 • Published 5 years ago

priority-queue-ds v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Priority Queue

Priority Queue Implementation in JavaScript

Installation & Usage :

npm install priority-queue-ds
const Queue = require('priority-queue-ds');

let queue = new Queue();
queue.enqueue("Walk the dog", 10); // enqueue take first argument as event and second argument as priority. Priority 1 is greater than 2
queue.dequeue(); // gives you the node with lowest priority