A Container Adaptor
is a special container with a modified and restricted interface for some special purpose.
- stack is a last in, first out (LIFO) abstract data type and linear data structure. A stack is characterized by only three operations; elements may be inserted, inspected, or removed only from the top of the stack, which is the last element at the end of the base container.The stack allows to access only the top element.
- queue is a first in, first out (FIFO) abstract data type and linear data structure. Elements may be added to the back of the queue and are removed from the front of the queue. Both the front and the back of a queue may be inspected. The queue allows to acces only the front and back elements.
- priority queue is an abstract data type which is like a regular queue or stack data structure, but additionally, each element is associated with a "priority".
A stack is an Adaptor that provides a restricted subset of Container functionality: it provides insertion, removal, and inspection of the element at the top of the stack.
A queue is an Adaptor that provides a restricted subset of Container functionality.
A priority_queue is an Adaptor that provides a restricted subset of Container functionality: insertion, inspection and removal.