Run merge sort on those. By induction, if it does the right thing, I'm going to get back two lists, and I'm going to then merge Them together. Notice what I'm going to do.
在这些上面再运行归并排序,根据归纳,如果这样是正确的,我将重新得到两个列表,然后我会把它们合并在一起。
Well, we saw the teaser in terms of that animation that suggests this merge sort algorithm when implemented by a computer is absolutely faster.
我们从前面的动画中可以看到,这个归并排序算法在计算机上实现之后,绝对比其他算法更快。
Let's run merge sort on it, and then we'll look at the code.
让我们在这个列表上运行归并排序,然后我们在看一下代码。
I chose Bubble Sort on the left Selection Sort on the right and then something called merge sort on the very right hand side and then I started this all off roughly at the same time and what was frankly striking at least to me at the time was, my God it's done.
我在左边选择冒泡排序,在中间选选择排序,在最右边选择归并排序,然后同时将它们启动,在那时,至少我是震惊了,天哪,它已经完成了。
应用推荐