Before I do that though, let me try and give you an analogy to keep this in mind of why we want to basically build these abstractions and what we need in order to have them work together.
在我们看例子之前请让我打个比方,以便你们能记住我们,为什么要建立这些抽象,以及要使它们协调工作,我们需要做些什么。
I'll let you chase it through, it does work. What I want to look at is, what's the order of growth here?
我会让你们去运行这个方法的,确实能得到正确答案,我想问的是,这个解决问题的方法的增长率是什么?
But you get scaffolding; you get depth or perspective: counting thousands of stars, about some vast work that involved the whole order of the universe."
不过当你们看到脚手架时;,你们能够得到深度的认知:,数数数以千计的星星:,缓缓移动的星星,就像从事于某种,关系到全宇宙的秩序的建筑工作“
And the context of sorting, the worst case is your handed a problem that's in complete reverse order because that implies you have - to do as more work that could possibly-- that you could-- you have to do more work than you would of course if things were in perfect order.
在排序的环境中,最糟糕的情况是待排序的序列是,完全逆序的,在这种情况下,你不得不做更多的工作-,比起一个较理想顺序的序列,你必须花费更多的努力。
So, it doesn't need to bind to a receptor on the surface of the cell in order to work because the molecule can actually enter the cell directly.
所以无需与细胞表面受体相结合来起效,因为这些分子能直接进入细胞
I know it's gonna take me a lot of work on the order of N squared steps to sort these things.
要对它们排序就要进行大量的工作,大概需要N平方步。
Really there's no work to be done if I am handed all in sorted order so, you know, There's no work to be done if I'm handed all of the arrays in sorted order so, you know, if I demand that you give me this assumption that the cups are already sorted and then I'll sort them for you, I mean, this is kind of a cyclical argument.
如果杯子是有序排列的,那就没必要再对它进行排序了,同样如果给出的序列本身就是有序的,那也不必再做什么,如果给出这样的假设:,杯子已经有序,但仍需要对其进行排序,这像是个循环的论点。
OK. A whole lot of work to basically say again, order b is linear.
这个方法是随b线性增长的,但是这方法也不错。
应用推荐