📌  相关文章
📜  高度为 h 的堆中元素的最小和最大数量 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:19.890000             🧑  作者: Mango

代码示例1
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.