Introduction
This post will give a general introduction of Queue, and some of its basic operations.
Definition
Similar to its meaning in ordinary English, a queue is defined as a waiting line, like a line of people waiting to purchase tickets, where the first person in line is the first person served.For computer applications, we similarly define a queue to be a list in which all additions to the list are made at one end, and all deletions from the list are made at the other end. Queues are also called first-in first-out lists, or FIFO.
The entry in a queue ready to be served, that is, the first entry that will be removed from the queue, is called the front of the queue. Similarly, the last entry in the queue, that is, the one most recently append, is called the rear of the queue.