A queue is a particular type of collection or abstract data type in which the entities in the collection are went in order and the principal functions on the collection are the addition of removal of entities from the front terminal position and entities to the rear terminal position. This creates the queue a First-In-First-Out (FIFO) abstract data structure. In a FIFO data structure, the first component added to the queue will be the first one to be replaced. This is similar to the need that once an element is added, all components that were added before have to be replaced before the new component can be called. A queue is an example of a sequential data structure.
Queues give services in transport, computer science, and operations research where several entities such as objects, data, persons, or events are stored and held to be executed later. In these contexts, the queue acts the function of a buffer.
Queues are frequent in computer programs, where they are constricted as data structures coupled with access routines, as object-oriented languages or in an abstract data structure as classes.