Mapa mental
Priority Queue
Conteúdo do mapa
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();
Informações
- Descrição
- Mapa Mental sobre Priority Queue, criado por Ian Arbuckle em 07-01-2015.
- Criado por
- Ian Arbuckle
- Visualizações
- 1
- Avaliação