A queue is a linear data structure that behaves like a real-world queue. It follows a first in, first out (FIFO) order of operations. New items are added to the end of the queue, whereas items are removed from the start. The main operations of a queue data structure are: enqueue, dequeue, peek and isEmpty.

1m read timeFrom 30secondsofcode.org
Post cover image
Table of contents
DefinitionImplementation

Sort: