Question: A double-ended queue or deque (pronounced deck) is a collection that is a combination of a stack and a queue. Write a class Deque that
A double-ended queue or deque (pronounced "deck") is a collection that is a combination of a stack and a queue. Write a class Deque that uses a linked list to implement the following API:

public class Deque Deque () boolean isEmpty() void enqueue (Item item) void push(Item item) Item pop() Item dequeue () create an empty deque is the deque empty? add item to the end add item to the beginning remove and return the item at the beginning remove and return the item at the end API for a generic double-ended queue
Step by Step Solution
3.41 Rating (154 Votes )
There are 3 Steps involved in it
Sure I can provide you with a class Deque that implements the given API using a linked list in Java Below is a simple implementation of such a class j... View full answer
Get step-by-step solutions from verified subject matter experts
