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

A binary min heap consisting of integers is implemented using array A[1 ....n] in which root node is stored at A[1] and locations A[1] through A[n] store the 'n' integer values in the heap. The minimum number of comparisons required to find maximum element in a min heap of 99 elements is

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

The correct option is D 49
Option (b)

It requires [n2]1 comparisons to find
maximum element of n 9 elements in
binary heap.

So, it will take [992]1

=49 comparisons

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Introduction to Logarithms
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon