wiz-icon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

The time complexity to delete an element at
index K (Kn) in a minheap of size n is

A
O(log log n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
O(log n)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
C
O(n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
D
O(n log n)
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B O(log n)
K being constant, total time complexity
is O(k log n) which is O(log n)

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Evaluation of Determinants
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon