Implement the ADT deque in Python, using the Python deque from the collections module, but with the interface of lecture 10-2.- See the lecture 10-2,...













Implement the ADT deque in Python, using the Python deque from the collections module, but with the interface of lecture 10-2.
















































- See the lecture 10-2, 57:51.
















































- The interface to implement is like the ADT queue (see lecture 10-2, 41:30) plus two methods for inserting and deleting elements at the end. You can call those methods enqueueEnd(item) and dequeueEnd(). You can add a comment in your code for specifying what do the two methods in your implementation. All the other methods are exactly the ones of the ADT queue interface.
















































So you have to implement a class, e.g., named MyDeque. Your class may use an object of the class deque from the module collections: from collections import deque. Your class must implement all the required methods.

































































































2. Implement in Python the ADT doubly linked list (see lecture 11-1, 41:09).
















































You mus timplement two classes: Node and DoubleLinkedList. You must implement all the methods without using external modules, as it is done for singlyLinkedList in the 11-1 video.








Nov 28, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here