The idea behind all these algorithms is that what's ultimately important is how many comparisons you ultimately need to make.
这些算法的思想是,你最终需要做多少次的比较,这才是真正重要的。
But for the most part, I mean, I've seen... I don't know how many times I've seen paparazzi almost get hit by cars.
但是大部分情况下,我是说,我见过……我都忘了多少次我看到狗仔队差点被车撞上。
I think you should take the lab sometime, but I don't know how many semesters that you have to take.
我觉得你们应该是不是地去做几次实验,我不太清楚你们要上多少个学期的课
How many swaps do I do in general in bubble sort, compared to selection source?
在冒泡排序中,一般要做多少次交换,对比选择排序呢?
Anyone? How many times can you tear a 4 billion page phone book in half?
谁知道?,40亿页纸每次对半撕,你能撕多少次?
How many people know that three times a week physical exercise,30 minutes each time has the same effect ? as our most powerful psychiatric drugs?
多少人知道,每周三次,体育锻炼,每次三十分钟,与最强劲的精神药物,有同样的效果?
Haze In Haze's case, he does this over and over and over again.
对于,他已经不知道多少次这样了。
I'm going to set up an index, which is going to tell me where to look, starting at the first part of the list, right?
索引告诉我从哪里开始检索数组,对不对?,然后我会去记录下我做了多少次比较,这样我就能看到这个算法的工作量了?
The inner loop, this part here, I do m times.
这个循环执行了多少次呢?
How many times do I go through the loop?
那我执行了多少次循环呢?
God bless. Oh, sorry, that wasn't a sneeze, it was a two? How many swaps do I do in bubble sort? A lot. Right. Potentially a lot because I'm constantly doing that, that says I'm running that inner loop a whole bunch of times.
上帝保佑,哦,抱歉,我没说清楚,这是两个问题,在冒泡排序中要做多少次排序?许多,正确的,可能要做很多次,因为在持续的干,这就意味着它要做很多次内部循环。
What is counting my way through this process?
什么东西在数着我循环这个过程多少次了?
So how many time do you think-- you all have a piece of paper in front you-- how many time do you think you need to roll over the piece of paper ? for the piece of paper to reach the moon?
你们认为需要折多少次-,你们面前都有一张纸-,你们认为需要将纸折叠多少次,才能碰到月亮?
Seven comparisons, right?
是我花了多少次操作来完成这件事?
Sorry? OK. You're doing the whole thing for me What's the complexity just of this inner loop m How many times do I go through that loop?
就这一块代码的,我执行了多少次这个循环?,次对不对?,here?,Just,this,piece。,我一会儿就会去得到你的答案的?
And I'll remind you, what I'm printing out there is first and last, with the range I'm looking over, and then just how many times the iteration called.
我要打印出来的是,每次的区间,也就是first和last指向的值,以及重复多少次了。
How many times do you need to fold the piece of paper so that you can reach the moon.
需要折纸多少次,才能碰到月亮。
So this isn't-- OK. And you're also close. It's going to be linear but how many times do I go through this?
每次能丢掉一半,所以这里不是-,好的,但你也很接近了,他可能是线性的,但我得遍历多少次呢?
Well, we certainly didn't know on day one how many times each of you was going to want to call get string, how many words a user might type when you call get string.
好的,当然我们不知道第一天你们,想要调用GetSting多少次,当你调用GetSting时,用户会输入多少单词。
And along the way I'm keeping track of how many iterations at the end I'll print how many iterations I took, before I return the final guess.
提到的方法去运行,并且我会跟踪到底,进行了多少次迭代,并在最后返回结果之前,显示进行了多少次迭代。
So if I start off with a list of length n, how many times can I divide it by 2, until I get to something no more than two left?
我能够除以多少次2呢?,直到我得到的长度不超过2么?,对数次,对吧?就像刚才那位同学说的那样?
How many swaps do I do in selection sort?
那选择排序要做多少次交换呢?
应用推荐