知识卡片

普通读书笔记卡 · 3629.d.1

倍增扩容使装载率不低于半

理解等级:中级

只支持插入的表在满时扩为两倍容量并复制旧元素。

扩容当次成本随原表规模增长,但扩容后装载率约为一半,随后随插入上升;因此空闲空间至多占容量约一半。

摊还成本需在后续单元证明。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第16章 摊还分析 · 查看原书依据

      A common heuristic allocates a new table with twice as many slots as the old one. If the only table operations are insertions, then the load factor of the table is always at least 1/2

    参考来源

    - 位置:《算法导论(第4版)》第16章《摊还分析》(OEBPS/chapter016.xhtml,文本字符[25000,30000))。 - 结论依据:16.4.1 节仅考虑插入,满表时新分配两倍容量并复制旧项;原文据此得装载率始终至少1/2,扩容时间另在后文分析。 - 原始内容:A common heuristic allocates a new table with twice as many slots as the old one. If the only table operations are insertions, then the load factor of the table is always at least 1/2