So we see that I've doubled the size of the vector but I've much more than doubled the number of calls.
所以我们看到我,把向量的大小翻倍了,但是我调用的次数,不仅仅是翻倍了。
But I've been there enough that I get a, I have a sense of what it's like there.
但我去那儿的次数够多了,所以我很清楚那儿是什么样子的。
Pardon? 17 million. Computers are fast, fortunately. Well, that's a lot of calls.
幸运的是电脑很快,好了,调用次数真是多。
Do the following a bunch of times, but a finite number of times which might be useful.
按照下面重复若干次,有限次数就足够了,这很有用。
The learner protests as he's being shocked more and more but the experimenter continues to request obedience.
随着被电击次数增多,学习者抗议了,但实验者继续要求他服从。
I just took the tests, um, several times, not too many times, but
我参加了几次考试,次数也不是太多,不过
Actually it's not 40, I think these are, 75 alright. So the answer is 75 and the number of calls is 1.7 million.
实际上不是4,我觉得,好了,所以答案是5,调用次数是1百70万次。
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了。
So when I do the analysis, I want to think about what am I doing here, am I capturing all the pieces of it? Here, the two variables that matter are what's the length of the list, and how many times I'm going to search it?
这里,要关注的,两个变量是列表,的长度以及我要搜索的次数,这种情况下,这个算法赢了?
It goes off after it's been hit a certain number of times.
在你玩了一定次数后,会有硬币吐出来。
应用推荐