And the nice thing is that there's a shared behavior there. Just as I can have tuples as an ordered collection of things, strings behave as an ordered collection of things.
共享的行为,就像元组是有序的元素序列,字符串也是有序的元素序列,因此我可以对字符串做同样的操作,我可以把它们连结起来。
I have sorted with the smaller problem 1 because that smaller problem right now is of size 1 and so it's sort of obviously the case that this cup is now sorted.
对这个较小的问题我已经排好序了,因为在这个小问题中只有1个元素1,那么很明显,这个杯子已经是有序的了。
Right, 'cause that means either I've been handed zero elements which mean there's really no work to be done or I've been handed one element which is a vacuous truth that it's sorted, right?
因为如果给出0个元素,那意味着不需要做任何事,如果给出1个元素,那显然,它是有序的,对吗?
It's one element like I claimed before it's sorted and so there's no work to be done.
当有1个元素时,在比较前就知道它是有序的,那就没必要再进行比较了。
This is sorted, this is sorted, how do I now make a list of size 2?
这个是有序的,这个也是有序的,我怎样才能组成一个有2个元素的列表?
应用推荐