What are the minimum and maximum number of elements in a hea

What are the minimum and maximum number of elements in a heap of height h? How many leaves does a binary heap with n nodes have?

Solution

2h is the minimum number of nodes that are possible in a heap that has a height h.

2h+1 -1 is the maximum number of nodes.

it has n/2 leaves.

 What are the minimum and maximum number of elements in a heap of height h? How many leaves does a binary heap with n nodes have?Solution2h is the minimum numbe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site