Program defines a linked-list implementation of a deque. The DequeAsLinkedList class extends the QueueAsLinkedList class introduced in Program and implements the Deque interface defined in Program . The QueueAsLinkedList implementation provides almost all of the required functionality. Only five of the six methods defined in the Deque interface need to be implemented.
Program: DequeAsLinkedList class ``Head'' methods.