知识卡片
叶节点删除直接判命中
删除搜索到叶节点时,
- 若键存在就直接移除;
- 若不存在,查询失败且无需修改树。
这是删除的基本出口,复杂调整发生在走向该叶子之前或删除内部键时。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第18章 B树 · 查看原书依据
Case 1: The search arrives at a leaf node x. If x contains key k, then delete k from x. If x does not contain key k, then k was not in the B-tree and nothing else needs to be done.
参考来源
- 位置:《算法导论(第4版)》第18章《B树》(OEBPS/chapter018.xhtml,文本字符[30000,35000))。
- 结论依据:原文Case 1分别说明叶节点命中与未命中的处理。
- 原始内容:Case 1: The search arrives at a leaf node x. If x contains key k , then delete k from x . If x does not contain key k , then k was not in the B-tree and nothing else needs to be done.