Question: 3. Both a stack and a queue can be implemented using a data structure called a Double Ended Queue also called a deque (pronounced deck).





3. Both a stack and a queue can be implemented using a data structure called a "Double Ended Queue also called a deque (pronounced deck). A deque allows fast storage and retrieval at both ends of the list Write the necessary functions to complete the program deque.cpp. You can assume that the queue is not empty when writing the get -front and getback methods. For marking purposes put front 1, 2 and 3; print the deque; put back 4, 5 and 6; print the deque; get front; print the deque; get back; print the deque File: deque.cpp This program implements a double ended queue of integers as a doubly linked list / #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
