• Right, so s of i saying, given the list, look at the i'th element, true is it the same thing?

    第2个元素,看他们是不是相等呢?,如果他们相等,好,把答案设置为?

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

  • I look at the rest of the list to decide what's the element to swap into the next place.

    我会查看列表剩下的部分,来看看需要交换哪个元素。

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

  • I would expect, whether you're a Red Sox fan or not, you to be able to look at a list of different pitchers and their average velocity for their fastball, and tell me who has the longest or the shortest wavelength.

    无论你是否是一个红袜队球迷,我预想你会看到一系列,不同的投手和他们,投出快球的平均速度,告诉我谁有最长的,或者最短的波长。

    麻省理工公开课 - 化学原理课程节选

  • If you look at the list of the richest people, they're all connected to finance, right?

    如果你看一下财富排行榜的话,他们都与金融有或多或少的联系,对吧

    耶鲁公开课 - 金融市场课程节选

  • Now it's down the list of ingredients, it's actually toward the end, but if you look at the marketing of this and look at the can it says, there's fresh potatoes and carrots, but actually there's more sugar in this than there is carrots.

    它在配料表的底部,几乎是在最后面,但如果你买东西时找到这个罐头,上会写着这里有新鲜的土豆和胡萝卜,但实际上其中糖要比胡萝卜多

    耶鲁公开课 - 关于食物的心理学、生物学和政治学课程节选

  • Because if you did what I suggested with the list, the time to look up the key would be linear in the length of the list. You'd have to look at each element until you found the key.

    字典是用一种很神奇的,叫做散列法的算法,来实现的,后面我们将,会学到一点关于。

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

  • So I'm first going to look for something that's not in the list, I'm going to see, is minus 1 in this list, so it's going to be at the far end, and if I do that in the basic case, bam.

    如果我试试第一种最基本的方法,噢,一下就完成了对不对?,因为这种方法查了下第一个元素,然后发现目标数比较下,因为目标数小于第一个元素。

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

  • I've got a list, walk you through it an element at a time, do I look at each element of the list more than once?

    你一次只能得到他的一个元素,我是不是把数组里面的每个元素,都过了大于等于一次?,你不这样认为么?大家有什么建议?

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

  • And the example I want to look at is, suppose I want to search a list that I know is sorted, to see if an element's in the list.

    看看目标元素在不在数组里,也就是说我要去,检索一个有序的数组。

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

  • If you look at his book, again in the first chapter, he gives a list of countries-- it's based on an analysis that some others--that Professors Dimson, Marsh, and Stanton used in their 2002 book.

    如果你再看看他在书中所讲的第一章,他列出了一些发达国家的名单-,这是根据其他一些人分析得出的,如迪姆森,马什及斯坦顿教授,在他们2002年出版的书中都用过。

    耶鲁公开课 - 金融市场课程节选

  • I look at the rest of the list, but I've changed the value.

    我们再来看看其余的列表,我已经改变的值。

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

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

    索引告诉我从哪里开始检索数组,对不对?,然后我会去记录下我做了多少次比较,这样我就能看到这个算法的工作量了?

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

  • Hmm. Well, wait a minute. If I want to sort a list, I'll take one element, I've got to look at probably a lot of the other elements in the list in order to decide where it goes. And that suggests it's going to depend on how long the list is.

    我会取一个元素,然后去查看列表,来决定要把那个元素放到哪里,这就意味着它依赖于列表的长度,对,这没什么说服力,但是事实上。

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

  • It took me seven comparisons, because I can take advantage of the fact I know I only ever have to look at the first element of each sub-list. Those are the only things I need to compare, and when I run out of one list, I just add the rest of the list in.

    进行了7次对比,因为我可以利用我知道的优势:,每次只需要比较每个子列表的第一个元素,那才是我需要进行对比的内容,当一个列表的元素处理完了,只需要将另一个列表剩下的元素直接添加进去。

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

  • This is a food, a common food that most people would recognize, and I'd just like to see if you could guess what it is from the list of ingredients, so take a moment to look at the list of ingredients and then I'll see if you can guess.

    这是一种食品,一种大多数人都见过的普通食品,我想看看,大家能否通过配料表猜出这是什么食品吗,所以,花点时间来看看这张配料表,看看大家能不能猜出来

    耶鲁公开课 - 关于食物的心理学、生物学和政治学课程节选

  • So it's going to look at the rest of the list, walking along, and what does it do?

    所以它会查看列表剩下部分,遍历它们,那它要做什么呢?

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

  • I'll look at the rest of that big chunk of the list, and that's a pain.

    因为这样每一步,都可以保证,排除当前数组的。

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

  • That one's not so obvious. So let's think about this for a second. To sort a list in linear time, would say, I have to look at each element in the list at most a constant number of times.

    所以让我们来思考一会,要在线性时间能排序,列表里每个元素最多被使用常数次,不一定是一次,对吧。

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

  • What's the last element in the list look like?

    列表中最后一个元素是什么样呢?

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

  • 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类型的数字吧,最简单的方式就是这么做了:

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

  • I could still do the linear case, which is order n or I could say, look, take the list, let's sort it and then search it. But in that case we said well to sort it was going to take n log n time, assuming I can do that.

    我仍然可以做O的线性搜索,或者也可以以这个列表为例,我们先将其进行排序,然后再进行查找,但是在这种情况下,要花费n,log,n的时间去对其进行排序。

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

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

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

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