知识卡片
旋转次数限制增强成本
若一次旋转后的属性修复要沿路径走到根,单次修复可能花对数时间;红黑树一次插删的旋转次数为常数,整体仍是对数时间。
换用可能做对数次旋转的平衡树,维护成本就可能升为对数平方。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 第17章 数据结构的扩张 · 查看原书依据
If each operation might require Θ(lg n) rotations and each rotation traverses a path up to the root, then a single operation could require Θ(lg2n) time, rather than the O(lg n) time bound given by Theorem 17.1.
参考来源
- 位置:《算法导论(第4版)》第17章《数据结构的扩张》(OEBPS/chapter017.xhtml,文本字符[20000,25000))。
- 结论依据:原文明确比较常数次旋转与每次旋转都上溯根节点时的渐近成本。
- 原始内容:If each operation might require Θ(lg n ) rotations and each rotation traverses a path up to the root, then a single operation could require Θ(lg 2 n ) time, rather than the O (lg n ) time bound given by Theorem 17.1.