recategorized by
825 views
6 votes
6 votes
A binary min-heap contains keys 1,2,3,4.....2047,2048

What is smallest key that can be at leaf node.??
recategorized by

1 Answer

Best answer
7 votes
7 votes
This tree has 2048 keys it means it will have 12 levels, 11 levels will be completely filled and there will be one node at 12 th level.

In min heap kth smallest element can be up to k levels, I think answer should be 11 because 11 can be anywhere UpTo 11 levels.
edited by
Answer:

Related questions

1 votes
1 votes
2 answers
1
Tariq Husain Khan asked Aug 23, 2016
670 views
the time required to find 7th smallest element in min heap of size n vertices? solve and plz explain how?