Question: A double-ended queue is a list that allows the addition and removal of items from either end. One end is arbitrarily called the front and
A double-ended queue is a list that allows the addition and removal of items from either end. One end is arbitrarily called the front and the other the rear, but the two ends behave identically. Specify, design, and implement a class for a double-ended queue. Include operations to check if it is empty and to return the number of items in the list. For each end, include operations for adding and deleting items. Implement the double ended queue as a doubly linked list. Call your class Deque (pronounced “deck”).
Step by Step Solution
3.44 Rating (157 Votes )
There are 3 Steps involved in it
To implement a doubleended queue Deque using a doubly linked list we will need to create a class that includes the following operations init This will ... View full answer
Get step-by-step solutions from verified subject matter experts
