Question DSA-QUE-0005
EasyWhat is a deque?
- A.
A queue of size 1
- B.
A queue that only removes
- C.
Show answer and explanation
Answer: C
Python's collections.deque gives O(1) appends and pops at both ends.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Queues and Deques question
What is a deque?
A queue of size 1
A queue that only removes
Answer: C
Python's collections.deque gives O(1) appends and pops at both ends.
A double-ended queue that allows insertion and removal at both ends
A sorted queue