Quidest?

Queue Data Structure

ยท Lorenzo Drumond

A queue is an abstract data type that serves as an ordered collection of elements. A simple queue typically has several operations:

  1. push: adds an item to the tail of the queue
  2. pop: removes and returns an item from the head of the queue
  3. returns an item from the head of the queue
  4. returns the number of items in the queue

The order in which elements come off a queue gives rise to its alternative name, FIFO (first in, first out)

Think of a line to get tickets. The first person to get in line will be the first person to receive a ticket and get out of line.

References

Next -> linked-list-data-structure

#structure #data #boot_dev #queue #computer_science #programming #memory