Question DSA-QUE-0047
MediumTwo stacks implement a queue. What is the amortised cost of dequeue?
- A.
O(1)
- B.
O(n²)
- 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
Two stacks implement a queue. What is the amortised cost of dequeue?
O(1)
O(n²)
Sign up free to see the answer and a step-by-step explanation.
O(n)
O(log n)