• Now, compare the first element in each of these lists. Two is less than three, so two ought to be the next element of the list.

    现在,比较每个列表的第一个元素,2要比3小,所以2应该是合并后列表的,下一个元素,然后你们就知道了。

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

  • OK. So, soon as I get down to a list that has no more than two elements in it, I'm done.

    不超过2个元素的列表,那就结束了,注意,这里是小于等于。

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

  • So, whether or not the email is addressed specifically to you in like the two field or if maybe you were BCC'd or it's a big email list of which you're just part, that could signify that this is in fact useful for you.

    所以,不管这个邮件是不是,单独发给你的,或者这个邮件有一个大的邮件列表,而你正在其中,其实这也暗示了,这个邮件对你是有用的。

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

  • Well, in giving these examples, I've already indicated at least two things that belong on the list.

    在举例的过程中,我已经说明,起码有两样东西在名单上。

    耶鲁公开课 - 死亡课程节选

  • How are we going to accomplish these two things on our list of agenda here?

    我们怎样才能在我们的日程之内,完成这两件事呢

    耶鲁公开课 - 聆听音乐课程节选

  • So the first thing we'll do is, we'll print the element, in this case it will be a list right? Because it's a list with two lists in it.

    因此这儿我们要做的第一件事,就是要显示元素,在这儿元素就是数组了对不对?,因为这个数组包含了两个数组。

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

  • 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?

    这里,要关注的,两个变量是列表,的长度以及我要搜索的次数,这种情况下,这个算法赢了?

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

  • I'm walking along the list once, taking two things and saying, make sure the biggest one is next.

    我遍历一次列表,每次取两个值,确认最大的元素在后面一个。

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

  • So at the moment left hand is at the start of this list of size 1, my right hand is at the start of this list of size 1, and now I need to merge these two lists.

    现在左手手指指向这个大小为1的列表的开始,右手手指指向这个大小为1的列表的开始,现在我需要合并这两个列表。

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

  • I shouldn't say list, those two tuples, and walk through them to find the pieces that match up.

    除数数组进行对比,我不该说数组的,是元组,遍历这两个元组找到相同的元素。

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

  • It says, well I'm going to print out first and last just so you can see it, and then I say, gee 2 if last minus first is less than 2, that is, if there's no more than two elements left in the list, then I can just check those two elements and return the answer.

    然后它计算了尾点和开始点的差,如果小于2的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。

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

  • So now we have a list containing two lists.

    另一个数组,也就是说我们。

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

  • It's the list of length less than two.

    就是列表的长度是否小于2。

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

  • We're going to call binary search, it's going to take the list to search and the element, but it's also going to say, here's the first part of the list, and there's the last part of the list, Well, it checks to see, is it bigger than two?

    我们将要调用这个二分查找,它将会在列表里面搜索元素,假定这里是,列表的第一个元素,那里是列表的最后一个元素,代码内部到底做了什么?

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

  • I'll let you just grok it but you can see it's basically doing what I did over there. Setting up two indices for the two sub-list,it's just walking down, finding the smallest element, putting it into a new list. When it gets to the end of one of the lists, it skips to the next part, and only one of these two pieces will get called because only one of them is going to have things leftovers.

    你们可以大体的浏览一下,但是它们基本就是我在那里所做的事情,为两个子列表设置了两个指针,指针顺着列表走下去,找到最小的元素,把它放入到一个新的列表中去,当它走到一个列表的尾部时,它会跳到下部分去,两部分中只有一个会被执行,因为只有一个会有元素剩余。

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

  • 2 6 8 1 3 7 5 If I start off with fou, two, six, eight, one, three, seven, 8 five, so my list is of size N equals 8 at the moment.

    顺序如下:,现在列表的大小N等于。

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

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定