File tree Expand file tree Collapse file tree
src/data-structures/queue Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Queue
2+
3+ In computer science, a queue is a particular kind of abstract data
4+ type or collection in which the entities in the collection are
5+ kept in order and the principle (or only) operations on the
6+ collection are the addition of entities to the rear terminal
7+ position, known as enqueue, and removal of entities from the
8+ front terminal position, known as dequeue. This makes the queue
9+ a First-In-First-Out (FIFO) data structure. In a FIFO data
10+ structure, the first element added to the queue will be the
11+ first one to be removed. This is equivalent to the requirement
12+ that once a new element is added, all elements that were added
13+ before have to be removed before the new element can be removed.
14+ Often a peek or front operation is also entered, returning the
15+ value of the front element without dequeuing it. A queue is an
16+ example of a linear data structure, or more abstractly a
17+ sequential collection.
18+
19+ Representation of a FIFO (first in, first out) queue
20+
21+ ![ Queue] ( https://upload.wikimedia.org/wikipedia/commons/5/52/Data_Queue.svg )
22+
23+ ## References
24+
25+ [ Wikipedia] ( https://en.wikipedia.org/wiki/Queue_(abstract_data_type) )
You can’t perform that action at this time.
0 commit comments