Table of Contents
A queue is a sequential container in which
elements are removed in the same order as their insertion. (FIFO: First-In, First-Out)
Data is added to the end and removed from the front of a queue.
only the front (least recently inserted) and back (most recently inserted) element may be accessed at any given time.
Actually, many authors would limit access to only the front element.
In general, queues are used when things must be processed "in order", but can “pile up” before we get to them.