So this is a nice little search-- sorry, a nice little sort algorithm . And in fact, it's relying on something that we're going to come back to, called the loop invariant.
恩,这是一个很棒的小搜索,抱歉,和很棒的小排序算法,事实上,它依赖于一些我们要回顾的东西,被称作循环不变量。
The loop invariant what does the loop invariant mean? It says, here is a property that is true of this structure every time through the loop.
循环不变量是什么意思?,它是一个在结构体中,每次循环都为真的属性。
But notice unlike a for loop, if you want to declare a variable or increment or decrement to variable, you've got to do that yourself.
但请注意不像for循环,如果你想声明一个变量,或者变大或变小一个变量,你需要自己完成。
What if I don't change the value of that variable inside of the code?
那么如果在循环内部,我不改变这些变量的值会怎么样?
应用推荐