#844 – The Queue Data Type

A queue is a data type used to store a collection of items and which has the following properties:

  • Elements can be added to the queue
  • Elements can be removed from the queue, but only in the order in which they were added

Adding an item is known as a Enqueue operation.  Removing an item is known as a Dequeue  operation.

You can think of a queue data type as being like people standing in a line.  You can enter the line only at the back (Enqueue) and you can leave the line, but only from the front (Dequeue).

A queue is also known as a FIFO (First-In, First-Out) structure.

844-001

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #844 – The Queue Data Type

  1. Pingback: Dew Drop – May 15, 2013 (#1,547) | Alvin Ashcraft's Morning Dew

Leave a comment