Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果我有一个函数对输入大小 n 进行 n*g 操作,但 g << n,我可以说该函数是线性 wrt n 吗?
不必要。例如,如果g = log(n),那么在(it is )中, g << nyetO(n * g)不是线性的。nO(n log(n))
g = log(n)
g << n
O(n * g)
n
O(n log(n))