Queue

Queues like stacks are a special kind of list. In the case of a queue, items are added to the back and removed from the front (FIFO structure). A queue is a line up.

Note that when we refer to the front and back of queue, it is not necessarily talking about the front and back of the data structure used to implement the queue. The front should be thought of as where the oldest item in the queue is and the back is where the newest item is. Most important is to maintain the FIFO structure.

results matching ""

    No results matching ""