adplus-dvertising
frame-decoration

Question

What is the time complexity to insert a node based on key in a priority queue?

a.

O(nlogn)

b.

O(logn)

c.

O(n)

d.

O(n^2)

Answer: (c).O(n)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the time complexity to insert a node based on key in a priority queue?