Question: Question 4 20 pts Consider a slight variation on the queue. In this version new items can be added to and removed from either end.

Question 4 20 pts Consider a slight variation on the queue. In this version new items can be added to and removed from either end. This data structure is commonly called a doubly-ended queue, or deque. Implement one method of each type, i.e. one insert" and one remove". given in the Deque class. You may assume the DequeException class has been defined for you. Hint: remember to handle all of the special cases! public class Deque { private class Node { private Node (T data) { this data = data; private I data; private Node]> next; private. Node
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
