Queue

Queues are very similar to stacks in that they both are linear data structures with dynamic size. However, queues are FIFO (first-in, first-out) data structures, like a line to a rollercoaster. That is, first come, first serve.

Along with stacks, queues are the most the basic list types in computing

A queue has a number of useful applications:

  • When a resource is shared by multiple consumers
  • Create directories
  • When data is transferring asynchronously between two resources

Backlinks