But if, at any point, I get to a place in the list where the thing I'm looking for is smaller than the element in the list, I know everything else in the rest of the list has to be bigger than that, I don't have to bother looking anymore.
比当前位置数组的元素要小,我也就知道后面的数肯定,也都比我的目标数要大了,我就不用再继续进行下去了,这意味着目标数不在这个数组中,我就可以退出了。
I don't know, I dropped out of public accounting, so maybe that means I am one of the boring ones, who knows?
我也不清楚,后来我就退出公共会计了,或许这意味着我是个无聊的人,谁知道啊?
It will probably quit at some point because of space issues, unless I'm writing an algorithm that is using no additional space.
其中一个的时候,它会一直运行下去,它可能在某一处因为空间问题退出,除非我写了一个。
Why 1? It's arbitrary, but it's anything other than zero so I just exit because something went wrong and this program is just going to bail.
为什么是1?这是任意的,但它是非零的,因为出错了,我退出程序,然后这个程序就释放了。
应用推荐