And the obvious question I could start with is, and suppose I ask you, how long does the algorithm implemented by this program take to run?
我开始这个话题的第一个问题是,假设我问你,由这个算法实现的程序大概,要运行多久才能给出答案?
So you can imagine that this is a very powerful mechanism. So let's look what happens when I run-- start to run this.
因此你可以想到这是一种很强大的机制,让我们看看让我开始运行,这个程序的时候会有什么结果。
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也跑遍整个范围,就是比之要小一,会发生什么?
应用推荐