All right. The fourth thing I'm going to do, is I'm going to then construct the block of code.
好,我要做的第四件事情就是,我会去写这块循环代码。
So let's step through this with a little more care And I keep saying, before we do it, - let's just actually try it out.
因此我会做做试验,我会去做一些实验性的输入,我可以输入。
So I actually want to have type checking as much as I can early on.
因此我会在尽可能早的地方去,做一个类型检查。
And in particular, if I think about that problem - actually I want to do this- if I think about that problem, I'm going to write a little piece of pseudo code.
关于这个问题尤其要注意的是,实际上当我考虑这个-,问题的时候我想这么做,我会去写一点伪代码。
So I'm going to check to see if- really can't read that thing, let me do it this way-- right, I'm going to increase the number of compares, and I'm going to check to say, is the thing I'm looking for at the i'th spot in the list?
让我们这样做吧-好-,我会去增加比较次数的计数器,然后去看看在第i处的元素,是不是我要找的呢?,这里s的意思就是,给定数组的?
应用推荐