go top 返回词典
• You'll also notice that this thing goes through the entire list, even if the list is sorted before it gets partway through.

你也能注意到，它始终会遍历列表,甚至列表在排序之前,就是有序的也是这样。

麻省理工公开课 - 计算机科学及编程导论课程节选

• Because in Germany everything is like, sorted out for you and very professional.

因为在德国，一切都给你整理好了，很专业。

一见钟情的学校 - SpeakingMax英语口语达人

• I haven't said how I'm going to get those sorted lists, but imagine I had two sorted lists like that.

我还没有说明我怎么才能得到已排序的列表,但是想像一下我现在已经有,两个已排序好序的列表了。

麻省理工公开课 - 计算机科学及编程导论课程节选

• In fact, better than that, this guy is already sorted as well because I whittled that problem down to size 1.

事实上，更好的结果是这个杯子也是有序的了,因为我已将这个问题的规模削减到只有1个元素。

哈佛公开课 - 计算机科学课程节选

• We'll get things sorted out in the next day or two.

在接下来的一两天里我们会在整理整理。

麻省理工公开课 - 固态化学导论课程节选

• Okay? That will be sorted up, it'll be up there.

明白吗,作业要放整齐,就放在那里

耶鲁公开课 - 基础物理课程节选

• OK? So the example I'm going to do, I'm going to search a sorted list.

来搜索目标元素，好，翻到课堂材料的第二页。

麻省理工公开课 - 计算机科学及编程导论课程节选

• So let me give you an example. Suppose I want to merge two lists, and they're sorted.

我想合并两个列表,并且这两个列表已经排好序了。

麻省理工公开课 - 计算机科学及编程导论课程节选

• Right, 'cause that means either I've been handed zero elements which mean there's really no work to be done or I've been handed one element which is a vacuous truth that it's sorted, right?

因为如果给出0个元素,那意味着不需要做任何事,如果给出1个元素，那显然,它是有序的，对吗？

哈佛公开课 - 计算机科学课程节选

• And that you might look at, for example, that first example, and say, man by this stage it was already sorted, yet it had to go through and check that the third element was in the right place, and then the fourth and then the fifth and then the six.

你可能会去看看例如第一个例子，然后要抱怨，到这里,它已经是排好序的了,但他还是得去遍历查看,第三个元素是不是在正确的位置,然后第四个，第五个，第六个。

麻省理工公开课 - 计算机科学及编程导论课程节选

• This list is sorted and that is, you know, stupid to say but it's very much correct.

这个序列是有序的，虽然有点愚蠢,但却是正确的。

哈佛公开课 - 计算机科学课程节选

• It's one element like I claimed before it's sorted and so there's no work to be done.

当有1个元素时，在比较前就知道它是有序的,那就没必要再进行比较了。

哈佛公开课 - 计算机科学课程节选

• That the phonebook was sorted alphabetically and that the array of numbers on the board behind the second row of paper itself was sorted alphabetically.

电话簿是按照字母顺序排列的,而且黑板上第二排后面的一系列数字,也是按字母顺排列的。

哈佛公开课 - 计算机科学课程节选

• I have sorted with the smaller problem 1 because that smaller problem right now is of size 1 and so it's sort of obviously the case that this cup is now sorted.

对这个较小的问题我已经排好序了,因为在这个小问题中只有1个元素1,那么很明显,这个杯子已经是有序的了。

哈佛公开课 - 计算机科学课程节选

• So each respectively, this is sorted 1 and 2 respectively 4 and 5, this is sorted but clearly they are not in the right order.

分别地，1磅和2磅的是有序的，同样4,4磅和5磅的也是有序的,但显然它们的顺序并不正确。

哈佛公开课 - 计算机科学课程节选

• Well let's see. My fall back is, I could just do linear search, walk down the list one at a time, just comparing those things. OK. So that's sort of my base. But what if I wanted, you know, how do I want to get to that sorted list? All right?

我只能做线性搜索了,一次遍历一遍列表，一个一个比较，但如果我想要,那怎样得到有序的列表呢？,现在的一个问题是，我们排序之前？

麻省理工公开课 - 计算机科学及编程导论课程节选

• We don't seem to be doing that just yet, certainly not as badly, alright, so at this point in the story I have a sorted list of size 4.

当然现在我们不需要那样做,此时此刻,我已对整个问题中大小为4的列表排好序了。

哈佛公开课 - 计算机科学课程节选

• At the end of the first round, I've got the smallest element at the front. At the end of the second round, I've got the smallest two elements at the front, in fact I got all of them sorted out. And it actually runs through the loop multiple times, making sure that it's in the right form.

看看发生了什么，在第一轮结束后,我把最小的元素移到了前面,第二轮结束后，我把最小的,两个元素移到了前面，实际上,所有的元素都排好序了,实际上，这个算法运行了几次循环，确认下这是正确的形式。

麻省理工公开课 - 计算机科学及编程导论课程节选

• This list is sorted, this list is sorted but they could be intermingled.

这个序列是有序的，这个也是有序的,可以将它们组合起来。

哈佛公开课 - 计算机科学课程节选

• Alright, so the list is now hopefully sorted correctly and it is, in fact.

现在，整个列表已经正确地,排好序了。

哈佛公开课 - 计算机科学课程节选

• So now, I have a list that's sorted of size 2.

现在大小为2的列表已排好序了。

哈佛公开课 - 计算机科学课程节选

• Where in the worlddid that sorted list come from?

如果我只是有一系列的元素，那怎么办呢？

麻省理工公开课 - 计算机科学及编程导论课程节选

• The merge, the sorted halves.

合并排好序的两部分。

哈佛公开课 - 计算机科学课程节选

• This list is sorted.

这个序列也是有序的。

哈佛公开课 - 计算机科学课程节选

• So to just preface what we're going to do next time, what would happen if I wanted to do sort, and rather than in sorting the entire list at once, I broke it into pieces, and sorted the pieces, and then just figured out a very efficient way to bring those two pieces and merge them back together again?

所以为了引导下一次,我们要讲的内容,如果我想做排序,而且不是一次吧整个列表排完,会发生什么，我把它拆成小的列表,然后把各个小列表排序,接着用高效的方法再把小的列表？

麻省理工公开课 - 计算机科学及编程导论课程节选

• Really there's no work to be done if I am handed all in sorted order so, you know, There's no work to be done if I'm handed all of the arrays in sorted order so, you know, if I demand that you give me this assumption that the cups are already sorted and then I'll sort them for you, I mean, this is kind of a cyclical argument.

如果杯子是有序排列的,那就没必要再对它进行排序了，同样如果给出的序列本身就是有序的,那也不必再做什么，如果给出这样的假设：,杯子已经有序，但仍需要对其进行排序，这像是个循环的论点。

哈佛公开课 - 计算机科学课程节选

• Basic idea, before I even look at the code, is pretty simple. If I've got a list that is sorted, in let's call it, just in increasing order, and I haven't said what's in the list, could be numbers, could be other things, for now, we're going to just assume they're integers.

我们可以说基本的思想是很简单的,如果我有一个排好序的数组，让我们认为这个数组是递增的吧，我并没说数组里元素是什么，可能是数字，也可能是其他的东西，现在我们假设是integer类型的数字吧，最简单的方式就是这么做了：

麻省理工公开课 - 计算机科学及编程导论课程节选

• Again. Basic premise of binary search, or at least we set it up was, imagine I have a sorted list of elements. We get, in a second, to how we're going to get them sorted, and I want to know, is a particular element in that list..

好，二分查找的基本前提，或者是我们建立二分查找的基础,我们已经有了一个排好序的元素列表，我们就需要知道如何来快速的排序,如何从列表中找到特定的元素。

麻省理工公开课 - 计算机科学及编程导论课程节选

• - So again, if you're unwinding what's going on here, this-- we sorted the left half which meant sort the left half, then the right half then the merge.

同样，如果你展开正在进行的一切-,我们已对左半部分排好了序，接着右半部分，接着合并。

哈佛公开课 - 计算机科学课程节选

\$firstVoiceSent
- 来自原声例句