时间复杂性[关闭](Time Complexity [closed])
如果我们有一个N^2*logN的算法,如果输入大小为64则需要1 ms; 输入大小为2048时运行此算法需要2 ^ 10 *(11/6)ms吗? 我在这里使用正比例,这就是为什么它对我来说似乎有缺陷。
If we have an algorithm which is order N^2*logN, and if it takes 1 ms with input size 64; does it take 2^10*(11/6) ms to run this algorithm with input size 2048? I am using direct proportion here, that's why it seemed defective to me.
最满意答案
最简单的解决方法可能是将2048除以64,将得到的数字插入复杂度方程,结果是输入大小2048的毫秒数。
Easiest way to solve is probably to divide 2048 by 64, plug the resulting number into the complexity equation, and the result is the number of milliseconds for Input size 2048.
更多推荐
发布评论