【发布时间】:2013-08-07 09:31:58
【问题描述】:
我正在阅读算法设计手册。作者说一棵树的高度是:
h = log n,
where
h is height
n = number of leaf nodes
log is log to base d, where d is the maximum number of children allowed per node.
他接着说完美平衡的二叉搜索树的高度是:
h = log n
我想知道第二个语句中的 n 是表示“叶节点的总数”还是“节点的总数”。
这带来了一个更大的问题,节点总数与完美平衡二叉搜索树的高度之间是否存在数学关系?
【问题讨论】:
标签: data-structures height binary-search-tree