Python's deque: Implement Efficient Queues and Stacks Quiz
Interactive Quiz ⋅ 7 Questions
By Leodanis Pozo Ramos
In this quiz, you’ll test your understanding of Python’s deque from the collections module.
By working through this quiz, you’ll revisit when deque outperforms list, with appends and pops at both ends being more efficient.
You’ll revisit using maxlen to create bounded buffers, and features of deque that allow you to build efficient queues and stacks with it.
The quiz contains 7 questions and there is no time limit. You’ll get 1 point for each correct answer. At the end of the quiz, you’ll receive a total score. The maximum score is 100%. Good luck!
Related Resources
Tutorial
Python's deque: Implement Efficient Queues and Stacks
Use a Python deque to efficiently append and pop elements from both ends of a sequence, build queues and stacks, and set maxlen for history buffers.