Queues

Queue is a FIFO (first in first out-items placed at the top can be accessed first) structure, which can be found in many programming languages. This structure is called a "queue" because it looks like a queue in the real world-people are waiting in a queue. Using queue, you can give following commands - 

  • Enqueue: Insert an item at the end of the queue.
  • Dequeue-Remove items from the top of the queue.