
Queue
Chapter 18
Queue ADT and Implementation
package collection.positional
Queue<E>
Uses: Buffer (Chapter 17)
Used By: PairingHeap (Chapter 27), AbstractGraph (Chapter 53), AdjacencyMatrixRepresenta-
tion (Chapter 54), AbstractWeightedGraph (Chapter 57), case study on maintaining request quorums
for Byzantine agreement (Section 5.8.1)
Strengths: A queue is a more specialized abstraction than a buffer, and is therefore more natural
for some applications. By providing restricted access, it helps prevent accidental misuse of the data
structure.
Weaknesses: Elements can only be inserted to the back and removed from the front. That is, it
can only support