PriorityQueue Implementation where the value with the highest priority moves to the front Priority starts at 0, and the greatest value being the lowest priority;

Extends

Constructor

Defined collections/PriorityQueue.js

dequeue Function Public


Defined collections/PriorityQueue.js

Removes the item with the highest priority from the queue

Returns Source
  1. function (){
  2. return this.remove();
  3. }

enqueue Function Public


Defined collections/PriorityQueue.js

Adds the value with the specified priority to the queue

Arguments Source
  1. function (priority,value){
  2. return this.insert(priority, value);
  3. }

License

MIT https://github.com/C2FO/comb/raw/master/LICENSE

Meta