In fact, better than that, this guy is already sorted as well because I whittled that problem down to size 1.
事实上,更好的结果是这个杯子也是有序的了,因为我已将这个问题的规模削减到只有1个元素。
A log algorithm typically is one where you cut the size of the problem down by some multiplicative factor.
对数级复杂度的算法就是指,通过一系列常量级步数的操作,可以将问题的规模。
When you're quadrupling in size in terms of people, there's always a tendency.
当公司需要将员工规模扩大为四倍时,许多公司会降低标准,但马克不会心慈手软。
We took the problem of size a thousand, we divided it in half.
当我们遇到一个规模为一千左右的问题时,会将其分为两部分。
Linear algorithms tend to be things where, at one pass-through, you reduce the problem by a constant amount by one. If you reduce it by two, 1 it's going to be the same thing.
有问题么?,线性复杂度的算法,当进行了一个,常量级步数的操作的时候,将问题的规模缩小了一个。
bug What I typically do is I start with the input that provoked the problem, and I keep making it smaller and smaller.
我这里做的就是从引起,出现的输入开始,然后将输入,一步步的缩小规模。
What we really want to worry about is, as the size of the problem gets larger, how does this thing grow? How does the cost go up?
随着问题规模的变大,解决问题花费的代价是怎么增长的,因此我们将会主要地讲讲?
The printout is simply telling me, what are the ranges of the search.
你可以看到这个方法每次都将,原问题的规模缩小了一半。
But in one step, I've reduced this problem in half.
我就将这个问题的规模减半了,我不仅仅是缩小了问题的规模。
If I'm running at nanosecond speed, 1000 n, the size of the problem, whatever it is, is 1000, and I've got a log algorithm, it takes 10 nanoseconds to complete.
如果这个问题的规模,也就是n,是,如果这个问题是对数级的,这将会占据10纳秒的时间,你一眨眼的时间。
应用推荐