Skip to content

priority queue

  • A priority queue is a generalization of a queue where each element is assigned a priority and elements come out in order by priority.
  • Priority queue is an abstract data type supporting the following main operations:
  • Insertp adds a new element with priority p
  • ExtractMax() extracts an element with maximum priority.
  • Removeit removes an element pointed by an iterator it
  • GetMax() returns an element with maximum priority withoutchangingthesetofelements
  • ChangePriorityit,p changes the priority of an element pointed by it to p
  • more info on pdf: pdf slides