Question DSA-QUE-0025
EasyWhich Python class gives O(1) adds and removes at both ends and is recommended for queues?
- A.
list
- B.
set
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Queues and Deques question
Which Python class gives O(1) adds and removes at both ends and is recommended for queues?
list
set
Sign up free to see the answer and a step-by-step explanation.
collections.deque
tuple