Queue
Queue
Topic: Queue
1. If FRONT = 0, then:
Write: UNDERFLOW and Return. [Underflow]
2. Set ITEM = QUEUE [FRONT].
5. Exit
Deletion in a Queue
LINK_Q_DELETE (INFO, LINK, FRONT, REAR, AVAIL, ITEM)
7. Exit
Deques
Deque (aka Double-ended queue) is a linear list in which
elements can be added or removed at either end but not in the
middle.
Output-Restricted Deque:
allows deletion only at one end while insertion at both the ends
of the list.
Work Space
Priority Queue