3 years ago1,000+ Views
A queue is an abstract data type in computer science used to store data and retrieve in a definite order. A queue is a first-in-first-out (FIFO) data structure because the first element that you add to a queue will be the first element to be removed. (see GIF) A queue can be implemented in different ways, such as a linked list with a pointer in the last node in addition to the first one. Depending on the programming language you use, there will be different ways of programming a queue. For example, in the standard template library for C++, there is a "queue" class that allows you to "push" (add) an element to a queue and "pop" (remove). Java also contains a queue library with queue operations More info on wiki-page: http://en.wikipedia.org/wiki/Queue_(abstract_data_type)