Answers for "minimum and maximum numbers of elements in a heap of height h"

0

minimum and maximum numbers of elements in a heap of height h

Hence the minimum number of nodes possible in a heap of height h is 2h.
Clearly a heap of height h, has the maximum number of elements when its lowest level is completely filled.
In this case the heap is a complete binary tree of height h and hence has 2h+1 -1 nodes.
Posted by: Guest on May-19-2021

Code answers related to "minimum and maximum numbers of elements in a heap of height h"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language