What are the time complexities for a priority queue implemented with a heap?
2025
What are the time complexities for a priority queue implemented with a heap?
Answer: A. Insert : θ(log n), Remove : θ(log n)
- A.
Insert : θ(log n), Remove : θ(log n)
- B.
Insert : θ(n), Remove : θ(1)
- C.
Insert : θ(1), Remove : θ(log n)
- D.
Insert : θ(log n), Remove : θ(1)
Attempted by 476 students.
Show answer & explanation
Correct answer: A
Explore the full course: Mppsc Assistant Professor Computer Science Paper 2
Loading lesson…