知识卡片
删除前让孩子多一个键
最小度为 t 的 B 树要求非根节点至少有 t−1 个键。删除算法在递归进入非根节点前,进一步保证它至少有 t 个键,比合法下限多一个。
这样即便在该节点删去一键仍不会欠填;必要时先从兄弟借键或合并,才能保持单次向下处理。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第18章 B树 · 查看原书依据
To prevent any node from becoming underfull, the design of B-TREE-DELETE guarantees that whenever it calls itself recursively on a node x, the number of keys in x is at least the minimum degree t at the time of the call.
参考来源
- 位置:《算法导论(第4版)》第18章《B树》(OEBPS/chapter018.xhtml,文本字符[30000,35000))。
- 结论依据:原文给出下降前至少t键的不变量及其防回溯目的。
- 原始内容:To prevent any node from becoming underfull, the design of B-T REE -D ELETE guarantees that whenever it calls itself recursively on a node x , the number of keys in x is at least the minimum degree t at the time of the call.