There's a much bigger thing that I'm a part of and if I don't accomplish everything I want to in this life, it's ok.
我属于更大的一个世界,如果我没能在今世完成一切目标,没有关系。
If you're wondering what's OK or what's not OK, it's very clearly written out in this handout, so make sure you read through it, because it is your responsibility to make sure that your calculator does not have anything extra programmed in it.
如果你不清楚什么可以什么不可以,讲义上写得很清楚,所以请大家务必看完它,因为你有义务保证,在自己的计算器里,没有编上额外的程序。
I don't think either of us are thrilled with the text, it's the best we've probably found for Python, it's OK. If you need it, it's there.
我不认为我们俩对于这个课本很满意,这是我们能找到的,最好的版本了,还不错,如果你需要它,就在网站上。
OK? And in fact, if you look at the code up here, and it's on your handout, the very first one, x 1, right here- if I could ask you to look at it-- is a piece of code to do it. And I'm less interested in the code than how we're going to analyze it, but let's look at it for a second.
实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。
So I'm going to go over here, and I'm going to type test search-- I can type and if you look at your handout, it's just a sequence of tests that I'm going to do OK. So initially, I'm going to set up the list to be the first million integers.
大家可以看看你们的课堂材料,那儿有一些我要做的实验,好,一开始我先去建立个,含有一百万个integer的数组,对,这有点儿简单,但是这给我提供了这样一个有序的数组。
On the other hand, if I want to sort it first, OK, if I want to do sort and search, I want to sort it, it's going to take n log n time to sort it, and having done that, then I can search it in log n time.
我先排序,好的,如果我想排序再搜索,我要排序,这需要花n,log,n时间排序,然后做完了,我们能花log,n时间搜索,啊,哪一种更好呢?恩,呵呵。
应用推荐