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

Q & ACategory: Data StructureWhat is the time complexity to insert a node based on position in a priority queue?
Admin Staff asked 4 years ago

What is the time complexity to insert a node based on position in a priority queue?
a) O(nlogn)
b) O(logn)
c) O(n)
d) O(n2)

1 Answers
Admin Staff answered 4 years ago

c) O(n)