Question: Im not looking for the answer I'm looking for a good outline so that it can help me stay on track while making the code

 Im not looking for the answer I'm looking for a good

Im not looking for the answer I'm looking for a good outline so that it can help me stay on track while making the code

Evaluation A rubric will be used to evaluate your solution. Description Develop a Python solution to the following problems. 1. Motivating observations. a. The Big-o for the addFront() and removeFront() methods are both O(1). b. The Big-O for the addRear() and removeRear() methods are both O(n). C. We would like to use a dictionary inside a Deque2 class to result in constant time performance 0(1) for addFront(), addRear(), removeFront(), and removeRear(). 2. Create a new Deque class, called Deque2, and modify this class as follows. (You may start by copying the Deque.py file from the pythonds folder.) a. Use a dictionary instead of a list to store the items in the double ended queue. That is, self.items should be initialized to an empty dictionary. i. You will need to determine how you will know the key value for the front and rear of the double ended queue. Hint: you will likely need a few instance variables to keep track of this information. b. Modify each method so that it will work for the self.items dictionary. C. Have the removeFront and removeRear methods return None when self.items is empty. 3. In your deque2.py source code file, add test code to test your Deque2 class. a. Be sure you are testing each method. b. Be sure you are testing use of a dictionary under the following conditions. i. Does each method work when the dictionary is empty? ii. Does each method work when the dictionary contains exactly one item? iii. Does each method work when the dictionary contains many items? 4. What files should you submit? a. Submit one Python source code file - deque2.py - as described in steps 2 and 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!