Mind map
Priority Queue
Map content
Priority Queue
Principle
- Set key as priority for high or low
- Insert based on the key priority
- Remove based on the priority key value at the front of queue
- First out on priority key value
Add Method
- int index; PQElement elem = new PQElement(priorkey,item);
- if (index > size()) thePQueue.add(elem); else thePQueue.add(index, elem);
Remove
- public Object dequeue() { return thePQueue.remove(0); }
FindElement
Size
- return PQueue.size();
isEmpty
- return PQueue.isEmpty();
Information
- Description
- Mind Map on Priority Queue, created by Ian Arbuckle on 07/01/2015.
- Created by
- Ian Arbuckle
- Views
- 1
- Rating