Lisp The problem with that technique, while it's very general, is how long does it take me to find the i'th element of the list?
很多编程语言包括,都是用了这种技术,这个问题就是,当数组很大的时候?
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.
我会取一个元素,然后去查看列表,来决定要把那个元素放到哪里,这就意味着它依赖于列表的长度,对,这没什么说服力,但是事实上。
应用推荐