The guest list for the dinner provided a sample. Among those seated in the State Dining Room were the first two Muslims elected to the U.S.Congress Keith Ellison and Andre Carson.
VOA: standard.2009.09.02
We give them a list of areas in the business, and they get to select their first, second, third choice.
在我们给出的公司业务的很多领域中,做出第一,第二,第三选择。
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.
因此这儿我们要做的第一件事,就是要显示元素,在这儿元素就是数组了对不对?,因为这个数组包含了两个数组。
This is the first time we have in Christianity someone attempting to say,"This is the authoritative 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年出版的书中都用过。
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.
如果我试试第一种最基本的方法,噢,一下就完成了对不对?,因为这种方法查了下第一个元素,然后发现目标数比较下,因为目标数小于第一个元素。
And that's like kind of hoping that the element you're searching for is the first in the list and the last in the list. Maybe.
也就是希望要找的元素,在数组的头部或者尾部,情况可能是这样的。
If I look for, say, minus 1, you might go, gee, wait a minute, if I was just doing linear search, I would've known right away that minus one wasn't in this list, because it's sorted and it's smaller than the first elements.
如果我要查找-1,你可能要怒了,呵呵,等一等,如果我用的是线性查找,我不会知道-1不在这个列表中,但是列表是排好序的,1又比第一个元素小。
Sure. So that says one should be the first element in my merge list.
所以可以确定1应该是合并后的,列表的第一个元素。
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的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。
I've added the ability to have more complex data structures here. But I dropped a hint in the first lecture about what you could computer with things. In fact if you think for a second about that list, you could ask what can I compute with just that set of constructs?
我添加了使用更复杂的数据结构的能力,但是我在第一节课给大家了了一个,关于你可以用什么来做计算的暗示,实际上如果你思考,这个列表一会儿的话,你会问我可以用?
应用推荐