All right? If I'm gambling, I'm saying, gee, if I'm really lucky, it'll be only on this side, and I've got a little bit of work to do, but if I'm unlucky, I'm scrawed, the past pluperfect of screwed, OK., or a Boston fish.
如果我够幸运的话,目标数就会在这边的,这会大大减少我的工作量,但如果不幸运呢?我就完蛋了,我就得再从剩下的这么大的数组里找了,这很痛苦,因此选中位数是正确答案。
because he has too much work to do but not enough time to finish everything.
因为他的工作量太大了,却没有足够时间把每件事做完。
If there are two people working together, there's about half as much work for each person to do.
如果有两个人一起工作,每个人大约只需要做工作量的一半
Notice here that it's different than the binary search case. We're certainly dividing down, but the combination now actually takes some work. I'll have to actually figure out how to put them back together. And that's a general thing you want to keep in mind when you're thinking about designing a divide and conquer kind of algorithm.
一个分治的例子,注这里,与二分查找所不同的地方,我们肯定是分解了,但是合并的过程还是需要一些工作量的,我会详细说明怎样把它们合并在一起的,当你在考虑设计一个分治算法时,这是你要必须记住的最基本的东西。
I'd say the major difference is probably the workload.
让我说主要的区别在于工作量。
They'd be busy for thousands of years.
因为这需要它们数以千年的工作量
you know, sixteen hours a day.
天16个小时的工作量了。
Question, is this amount of work a good amount of work or a bad amount of work?
问题是这个工作量,是不是最优的工作量呢
I'm going to set up an index, which is going to tell me where to look, starting at the first part of the list, right?
索引告诉我从哪里开始检索数组,对不对?,然后我会去记录下我做了多少次比较,这样我就能看到这个算法的工作量了?
The problem here isn't really about the amount of work.
这里的问题不在于工作量多少
How much work do I have to do to actually merge them together?
我需要耗费多大的工作量来他们进行合并?,让我来举个例子?
应用推荐