Question DSA-QUE-0067
HardWhich data structure gives O(1) push and pop at both ends?
- A.
A sorted array
- B.
A singly linked list with only a head pointer
- 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 data structure gives O(1) push and pop at both ends?
A sorted array
A singly linked list with only a head pointer
Sign up free to see the answer and a step-by-step explanation.
A binary heap
A deque (double-ended queue)