If it's there, I'm done, if not, I keep walking down, and I only stop when I get to a place where the element I'm looking for is smaller than the value in the list., in which case I know the rest of this is too big and I can stop.
并且保持遍历,我只在当当前位置的数组元素,大于目标数时停止,这意味着剩下的元素都比目标元素大,但是其他的情况,我还是要遍历完整个数组。
Yeah. I could eat chocolate non-stop for the rest of my life and be happy.
喜欢。我可以下半辈子不停地吃巧克力,并且过得很幸福。
应用推荐