All right? And I'm going to say-- sort of set that stage here, so that-- It turns out that that's probably about the best we can do, or again ends at the length of the list.
我要说的是,这一阶段的集合,我们用最优的方法完成,还是取决于列表的长度,好的,还是回到了我的问题上了。
OK. And I'm going to look to see, is a particular element inside of that list, and again, I'll remind you, that's just giving me the integers from zero up to 9999 something or other.
一个又大又长的列表吧,好的,我打算查找列表中的一个特定元素,我会告诉你,我用的是0到大概是,9999左右的整数。
And in the next spot, maybe I've got a really long list, and I'm going to say how to jump to get to the next element.
可能我得存放一个很长的列表了,你们也明白如何定位下一个元素,好的,这很棒,这样我有一个。
OK, there's the first run, I'm going to take a different list.
好的,这是第一次运行,我要测下另外一个列表。
It's going to let j run over the length of the list all right, so it's going to start at some point to move down, and then it's going to let i run over range, that's just one smaller, and what's it doing there?
就在这里,会做什么呢?,我们让j遍历这个列表,好的,它要从某一定开始移动,然后让i也跑遍整个范围,就是比之要小一,会发生什么?
应用推荐