This is a highly simplified version, but sort of closes the loop on what we've been talking about.
以上是对整个过程的高度概括,但它涵盖了我们讲过的内容
So what I wanted to do is loop back, at least with a couple of things that we see recurring and very understandably so, but let's try to clear up a couple of frequently occurring issues.
所以我想要做的是回环,至少用两三个,我们看到的东西返回,并且可以理解地,让我们试着处理几个,频繁发生的事情。
The loop invariant what does the loop invariant mean? It says, here is a property that is true of this structure every time through the loop.
循环不变量是什么意思?,它是一个在结构体中,每次循环都为真的属性。
Oh, there's a man at the store and now we have a loop where he is just looking through my inventory one at a time and reciting what it is I actually picked up.
商店里有一个人,现在我们有一个循环,通过这个循环他可以看到我的库存,然后显示出来我实际上都采摘了哪些水果。
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了。
应用推荐