Question DSA-QUE-0073
HardWhat problem does a double-ended priority queue (such as a min-max heap) solve?
- A.
Detecting cycles
- B.
Sorting strings
- 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
What problem does a double-ended priority queue (such as a min-max heap) solve?
Detecting cycles
Sorting strings
Sign up free to see the answer and a step-by-step explanation.
Finding the median only
Getting both the minimum and the maximum in O(1) and removing either in O(log n)