Program defines a linked-list implementation of a deque. The DequeAsLinkedList class is defined using multiple inheritance: It is derived from both the Deque abstract base class and the QueueAsLinkedList linked-list implementation of a queue. The Deque class provides the interface; the QueueAsLinkedList, the implementation.
Program: DequeAsLinkedList Class Definition
The QueueAsLinkedList implementation provides almost all of the required functionality. For example, Program shows that the Head, EnqueueTail and DequeueHead operations of the DequeAsLinkedList class are implemented by calling the appropriate QueueAsLinkedList class operations.
Program: DequeAsLinkedList Class Head, EnqueueHead and DequeueHead Member Function Definitions