OK, here we go, here we go, you see, I'm doing it down here, I can't see it, does that-- ah, I hear his sighs of relief, OK, good. There we go. Better. All right.
好,我们开始,大家可以看到,我在这里写这个程序,我看不见,这是不是-啊,我听到大家放松的叹气了,好,让我们开始吧,好多了,好。
But ah, yeah, there are a lot of people here who are.
当然了,这里的很多人都是这样的。
If I come into this code, I'm going to check this branch first, if it's not true, ah, there's a return at the end of that branch. If it is true, I do that, and then I've got a second test. If it's true, return I return, otherwise a return.
但是如果我们看看这里,如果我看这段程序,我会先检查这一部分,如果它是假的,啊,这部分分支结尾有一个。
You say to yourself, "Ah ha! There is an example of somebody taking language by the scruff of the neck and changing it as an individual, exerting an individual will over against the conventional nature of language."
你也许会想,这不就是一个,凭个人力量改变语言,的活生生的例子吗,它的确改变了语言的惯例“
Here's 0, 1, 3, ah-ha, here's 4, 5, 6 what is there?
这里是0,1,3,啊哈,这里是4,5,6,哪里是什么东西?
But ah... yes, there is a slight problem with the elevator.
但是,呃……对,电梯出了点问题。
Cost, ah, there is a factor that may be a determinant.
有一个决定性的因素。
In binary search-- ah, there's that wonderful phrase, this is called a version of binary search just like you saw bin-- or bi-section methods, - when we were doing numerical things- in binary search, I need to keep track of the starting point and the ending point of the list I'm looking at.
就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。
All right. If you flip to the second side of your handout, you'll see that I have a piece of code there, that does this-- let me, ah, I didn't want to do that, let me back up slightly- this is the algorithm called search.
你可以看到实现这个功能的代码,让我,额,我不想这么做,让我们回来一点,这就是命名为search的算法-,我们来看看这个算法吧。
应用推荐