我只想要得到内嵌的这个循环的复杂度?
在复杂度谱的最顶端,您可以以优化循环内的优化循环结束,每个周期都使用不同的迭代频率。
At the top end of the complexity spectrum, you could end up with refinement cycles within refinement cycles, each with different iteration frequencies.
可能是您的程序陷入了死循环或者您需要改进您的算法复杂度。
May be your problem falls into a infinite loop or you should reduce your algorithm complexity.
What's the complexity of that inner loop?
我只想要得到内嵌的这个循环的复杂度?
Now this happens to be what we would call a linear process, because the number of times I go around the loop is directly related to the size of the argument. If I double 2 the argument, I'm going to double the number of times I go around the loop. If I increase it by five, 5 I'm going to increase by five the number of times I go around the loop.
这恰好是我们会成为,线性复杂度程序的一个例子,因为我要执行循环的次数是,和输入的参数的大小直接相关的,如果我将这个参数乘以,那么我就要将进行循环的次数也乘以2了,如果我把参数加上,那么循环的次数也要加上5了。
应用推荐