知识卡片

普通读书笔记卡 · 1289.g.2

增长阶比较需要留意小输入

理解等级:初级

Θ 记号关注大输入下的增长阶,忽略常数系数和低阶项。

Θ(n²) 最终会比 Θ(n³) 增长慢,但在小输入上,常数和低阶项可能让前者实际更慢;选实现时须结合预期规模与测量。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 第2章 算法入门 · 查看原书依据

      Due to constant factors and lower-order terms, an algorithm whose running time has a higher order of growth might take less time for small inputs than an algorithm whose running time has a lower order of growth.

    参考来源

    - 位置:《算法导论(第4版)》第 2 章 2.2 节“Order of growth”(`OEBPS/chapter002.xhtml`)。 - 结论依据:原文说明主导项、常数的抽象,以及增长阶优者在小输入上可能仍较慢。 - 原始内容:Due to constant factors and lower-order terms, an algorithm whose running time has a higher order of growth might take less time for small inputs than an algorithm whose running time has a lower order of growth.