Skip to content

Commit cb7f837

Browse files
committed
B树高度latex公式
B树高度latex公式
1 parent 426976f commit cb7f837

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ebook/zh/03.02.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ typedef struct {
129129

130130
对于一棵含有N个关键字,m阶的B树来说(据B树的定义可知:m满足:ceil(m/2)<=**m**<=m,m阶即代表树中任一结点最多含有m个孩子,如5阶代表每个结点最多5个孩子,或俗称5叉树),且从1开始计数的话,其高度h为:
131131

132-
133-
<img src="http://www.forkosh.com/mathtex.cgi?h\leq\log_{\left \lceil m\over 2 \right \rceil}{\left(N+1\over 2\right)}+1">
132+
![](http://www.forkosh.com/mathtex.cgi?h\leq\log_{\left \lceil m\over 2 \right \rceil}{\left(N+1\over 2\right)}+1)
134133

135134
这个B树的高度公式从侧面显示了B树的查找效率是相当高的。为什么呢?因为底数m/2可以取很大,如m可以达到几千,从而在关键字数一定的情况下,使得最终的h值尽量比较小,树的高度比较低。
136135

0 commit comments

Comments
 (0)