I look at the rest of the list to decide what's the element to swap into the next place.
我会查看列表剩下的部分,来看看需要交换哪个元素。
If it was an unordered list, we were basically stuck with linear search. Got to walk through the whole list to see if the thing is there.
如果是一个未排序的列表,基本上我们就只能使用线性搜索了,通过遍历整个列表来查看。
So it's going to look at the rest of the list, walking along, and what does it do?
所以它会查看列表剩下部分,遍历它们,那它要做什么呢?
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.
我会取一个元素,然后去查看列表,来决定要把那个元素放到哪里,这就意味着它依赖于列表的长度,对,这没什么说服力,但是事实上。
应用推荐