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
function (){
   return this.remove();
           
}
    

enqueue Function Public


Defined collections/PriorityQueue.js

Adds the value with the specified priority to the queue

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

License

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

Meta