If I come into this code, I'm going to check this branch first, if it's not true, ah, there's a return at the end of that branch. If it is true, I do that, and then I've got a second test. If it's true, return I return, otherwise a return.
但是如果我们看看这里,如果我看这段程序,我会先检查这一部分,如果它是假的,啊,这部分分支结尾有一个。
chickens OK, and then once I've got that, well, notice: I can then check to see, did I return that special symbol none?
第二部分是:,现在一旦我获得了这两个值,注意,我将再检查一下?
I check the return value of GetInt is greater than zero.
我检查了GetInt的返回值比0大。
It says, well I'm going to print out first and last just so you can see it, and then I say, gee 2 if last minus first is less than 2, that is, if there's no more than two elements left in the list, then I can just check those two elements and return the answer.
然后它计算了尾点和开始点的差,如果小于2的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。
应用推荐