in DS
184 views
0 votes
0 votes
How to detect the maximum level and minimum level at which an element of heap can be made to be present?

Suppose a min heap has elements from 1 to 1024 .
Suppose a max heap has elements from 1 to 1024.

Find for : 9, 100, 512. (Both max and min heap, max and min level possible)

Root is at level 1.
in DS
184 views

1 comment

For min heap:

9@level 3

100@level 6

512@level 8 ??
0
0

Please log in or register to answer this question.