问题
I have the understanding about the Big-Oh notation. But how do I interpret what does O(O(f(n))) mean? Does it mean growth rate of the growth rate?
回答1:
x = O(n) basically means x <= kn for some constant k.
Thus x = O((O(n)) means x <= pO(n) for some constant p, which means x <= pqn for some constant q.
Let k = pq.
Then x = O((O(n)) = O(n).
In other words, O(O(f(n))) = O(f(n)).
I am curious, where did you see such notation being used?
回答2:
From a Big-Oh point of view:
g(n) = O(f(n)) means g(n) <= K*f(n) for some K (and after some n1)
But then h(n) = O(O(f(n)) would mean something like h(n) <= L * M * f(n) for some L, M, after some n > n1, n2.
来源:https://stackoverflow.com/questions/25838708/what-does-oofn-mean