If I go on doing this exercise again, and again, and again what am I going to end up with?
如果我不断重复这个过程呢,最后结果会是怎么样的
So this is very similar, this is a kind of recursive thinking we talked about earlier, where we take our problem and we make it smaller we solve a smaller problem, et cetera.
我们则跳过比猜想数小的那个区间,然后我们重复这一过程,跟之前我们讲过的,递归思想非常类似,我们解决问题的时候,先把问题一步步变小,然后解决小问题。
Right, so the fact that everything is indented means while 2 we're doing, while the variable is not equal to 2, keep doing this.
事实上缩进意味着,如果变量不等于,就重复我们现在所做的这个过程。
Carter You just repeat the same reasoning again and again, and you eventually get down to 1.
你就一直重复刚才的过程,最终你会得到1
We can do the same thing for nitrogen.
我们可以对氮原子重复这个过程。
If you repeatedly go through this cycle of denaturing, synthesizing, denaturing, synthesizing you'll get many, many copies of DNA.
如果你不断重复这个变性-复制,变性-复制的循环过程,你就会得到很多很多的DNA复制产物
So I have to get out the damn scale again and go through that whole process.
那我就不得不再次使用那个讨厌的天平并,进行整个重复比较的过程。
And when I threw those away, I was left once again with a little box, and I could do it again, and again, and again.
剔除之后,我得到了更小的方格,我可以一次一次的重复这个过程
We could repeat this argument all the way down to 1.
我们一直重复这个过程最后就剩1了
And so we're going to repeat.
所以我们将重复这个过程。
We then repeated the same process.
继续重复相同的过程。
I have to do this whole stupid process again.
我还得再次重复整个无聊的比较过程。
I was just finding very tunnel vision-like, the smallest elements at that moment in time which means I don't know anything about the other elements other than they are not the smallest and so no matter what with Selection Sort I had to repeat this again and again and again and if you do out the math it's roughly N squared steps in the worst case as well.
我只有一个狭窄的视野,只知道某时刻的最小元素,就意味着我并不知道其他元素的任何情况,只知道它们不是最小的,所以不管怎样,在选择排序中,我就得一遍一遍地重复选择过程,在最坏情况下,大概需要N的平方次比较。
应用推荐