A queue is a sequential collection of objects which can be modified from the front or back only


Queue Operations

Core Operations

  • enqueue Add an element to the end of the queue
  • dequeue Remove and return the element at the front of the queue

Other Operations

  • peek reveal the element at the front of the queue
  • pop return and remove the element at the end of the queue