I think that Avatar was an attempt to merge science fiction back to its roots of having a warning."
VOA: standard.2009.12.19
I hope you can see this because I'm going to try and simulate what a merge sort does. I've got eight things I want to sort here, and those initially start out here at top level.
我希望你们认真看,因为我要尝试着模拟出归并排序的操作过程,这里我有八个元素进行排序,第一步是将它们分成两半,对吗?
So I always have to do a merge of n elements.
所以我始终需要做n个元素的合并。
What they usually do is they take the underperforming fund and they merge it with one that has a better track record.
更常见的做法是把运作不佳的基金,合并到另一只表现良好的基金中去
Well, we saw the teaser in terms of that animation that suggests this merge sort algorithm when implemented by a computer is absolutely faster.
我们从前面的动画中可以看到,这个归并排序算法在计算机上实现之后,绝对比其他算法更快。
But this is a type with which Sal longs to merge.
但这是萨尔渴望融合进去的一类美国人。
the whole section of the essay in which he's talking about classicism and which he later calls "tradition" is meant to suggest that we really can't merge horizons effectively unless we have a very broad and extensive common ground with what we're reading.
他花了一整个部分来讨论古典主义,他后来称其为,“传统“,是想要暗示,我们不可能有效地合并视界,除非我们对于我们的所读,有着极广的认识。
When these two merges are done, we're basically at a stage in that branch where we can now merge those two together, which gives us that, and it goes through the rest of it.
拿到从那边得到的第二个子列表,这是一个基本情况,合并它,当这两个合并完成后,我们基本到了该分支阶段,这里我们可以把两个合并在一起。
Merge up here. There's a little more code there.
在这里进行合并,这里的代码有点多。
And it's called divide and conquer for the obvious reason. I'm going to divide it up into sub-problems with the hope that those sub-problems get easier. It's going to be easier to conquer if you like, and then I'm going to merge them back. Now, in the binary search case, in some sense, this is a little bit trivial.
因此被称为分治的原因就这么简单,将一个问题分解成一些子问题,并希望这些子问题解决起来比较方便,正如你希望的,求解的过程也会变得简单,下面就是把结果合并起来,现在,在二分搜索的例子里,从某些方面来说,这有点微不足道。
So to just preface what we're going to do next time, what would happen if I wanted to do sort, and rather than in sorting the entire list at once, I broke it into pieces, and sorted the pieces, and then just figured out a very efficient way to bring those two pieces and merge them back together again?
所以为了引导下一次,我们要讲的内容,如果我想做排序,而且不是一次吧整个列表排完,会发生什么,我把它拆成小的列表,然后把各个小列表排序,接着用高效的方法再把小的列表?
So supposed that I give you 16 elements to sort, well, following the logic before, the running time involved in sorting 16 elements is gonna be twice the running time 16 of sorting 8 elements, left half and right half plus 16 - and again, a little sanity check, 16 means-- just the merge steps, right?
现在要对16个元素进行排序,根据之前的逻辑,对16个元素排序,要花的时间是对8个元素排序所花时间的,2倍,分别用于左半部分和右半部分,再加上6,这里16是-,做合并的步数,对吗?
Down here, I've just got two things to merge, and then I've got things of size two to merge and then things of size four to merge. But notice a trade off. I have n operations if you like down there of size one.
但是n的大小是不同的,是吗?在这里我们只要合并两个元素,然后是合并长度为2的列表,接下来是合并长度为4的列表,但是观察一下之间的权衡关系。
应用推荐