Question: 1. Use the following functions to implement a double-ended-queue. Deque(), addFrontitem), addRear(item), removeRear(), is Empty(), size() And check it with: q=Deque() print(q.isEmpty() q.addFront (70) print(q.getSize())
1. Use the following functions to implement a double-ended-queue. Deque(), addFrontitem), addRear(item), removeRear(), is Empty(), size() And check it with: q=Deque() print(q.isEmpty() q.addFront (70) print(q.getSize()) q.addFront (150) q.addRear (600.37) print(q.getSize()) print(q.peek()) q.removeFront() q.addRear("True") print(q.peek()) q.addRear("Python") print(q.removeFront())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
