为什么O(n)等于O(2n) [英] Why is O(n) equal to O(2n)

查看:111
本文介绍了为什么O(n)等于O(2n)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解O(N)本质上等于O(cN),其中c =某些常数".但是如果N = c.难道不是O(N)^ 2.这随着c的增加而成立还是存在某种形式上的限制?

I understand that O(N) is essentially equal to O(cN) where c='some constant'. But if N = c. Doesn't that make it O(N)^2. Does this hold as c increases, or is there some formal limit.

推荐答案

如果 N = c ,则 c 不是常数.因此,绝不是这种情况.

If N = c then c is not constant. Therefore this is never the case.

这篇关于为什么O(n)等于O(2n)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆