C++ Program to Illustrate usage of deque

This C++ program illustrates usage of deque. Deques is acronym for double-ended queues with dynamic sizes that can be expanded or contracted on both ends. It provides efficient insertion and removal at both of its ends but unlike vectors, the elements are not stored in contiguous storage locations.

Here is the source code of the C++ program which illustrates usage of deque. The C++ program is successfully compiled and run on a Linux system. The program output is also shown below.