adplus-dvertising
frame-decoration

Question

What is the complexity of adding an element to the heap?

a.

O(log n)

b.

O(log h)

c.

O(h)

d.

both a and c

Answer: (d).both a and c

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 complexity of adding an element to the heap?