在每次循环迭代中增加一个计数。
不过,在本例中,我选择在每次循环结束后回收内存。
However, in this case I would much rather reclaim that memory at the end of each loop.
它是一个在结构体中,每次循环都为真的属性。
It says, here is a property that is true of this structure every time through the loop.
So it's certainly at least linear in the length of the list. For each starting point, what do I do?
它至少是线性的计算列表的长度,每次到了循环开始的点?
Once each time. Right? I only do one swap potentially, it-- though not one potentially, each time at the end of the loop I do a swap.
每次循环做一次,对么?我其实,就可能做了一次交换,也许并不是可能,每次循环的结束我都得做一次交换。
If you start with only one, you have two pieces of DNA, then you'll get 2 to the Nth fragments after N cycles because each cycle you're doubling the number.
如果你从仅仅一个DNA开始,你有两条DNA链,经过N次循环后,就得到二的N次方个DNA片段,因为每次循环都使其数量翻倍
应用推荐