From 248f1bc3a82823571ed41a8f9e6b21f3263d8b7d Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sat, 14 Apr 2018 09:36:15 +0300 Subject: [PATCH] Add README. --- src/data-structures/queue/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/data-structures/queue/README.md diff --git a/src/data-structures/queue/README.md b/src/data-structures/queue/README.md new file mode 100644 index 0000000000..e12fe15f42 --- /dev/null +++ b/src/data-structures/queue/README.md @@ -0,0 +1,25 @@ +# Queue + +In computer science, a queue is a particular kind of abstract data +type or collection in which the entities in the collection are +kept in order and the principle (or only) operations on the +collection are the addition of entities to the rear terminal +position, known as enqueue, and removal of entities from the +front terminal position, known as dequeue. This makes the queue +a First-In-First-Out (FIFO) data structure. In a FIFO data +structure, the first element added to the queue will be the +first one to be removed. This is equivalent to the requirement +that once a new element is added, all elements that were added +before have to be removed before the new element can be removed. +Often a peek or front operation is also entered, returning the +value of the front element without dequeuing it. A queue is an +example of a linear data structure, or more abstractly a +sequential collection. + +Representation of a FIFO (first in, first out) queue + +![Queue](https://upload.wikimedia.org/wikipedia/commons/5/52/Data_Queue.svg) + +## References + +[Wikipedia](https://en.wikipedia.org/wiki/Queue_(abstract_data_type))