作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在 page 47 上看到这段话的 Introduction to Algorithms by Cormen et al. :
The number of anonymous functions in an expression is understood to be equal to the number of times the asymptotic notation appearrs. For example in the expression:
Σ (i=1 to n) O(i)
there is only a single anonymous function (a function of i). This expression is not the same as O(1) + O(2) + ... + O(n), which doesn't really have a clean interpretation.
这是什么意思?
最佳答案
我认为他们是在说当他们使用该表示法(大 O 的总和)时,这意味着只有一个 O(i) 函数(称之为 f(i)
),然后表达式引用总和从该函数的 1 到 n。
这与 n
不同不同的功能(将它们称为 f_1(i)
到 f_n(i)
),每个都是 O(i)
, 然后表达式引用 f_1(1) + f_2(2) + ... + f_n(n)
的总和.后一件事不是符号的意思。
关于algorithm - CLRS 的这段话是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12666284/
我是一名优秀的程序员,十分优秀!