All right? If I'm gambling, I'm saying, gee, if I'm really lucky, it'll be only on this side, and I've got a little bit of work to do, but if I'm unlucky, I'm scrawed, the past pluperfect of screwed, OK., or a Boston fish.
如果我够幸运的话,目标数就会在这边的,这会大大减少我的工作量,但如果不幸运呢?我就完蛋了,我就得再从剩下的这么大的数组里找了,这很痛苦,因此选中位数是正确答案。
and if you are lucky, you might see one walking by and you can interview them.
如果你幸运的话,你可能会看到一个路过的名人,那么你就可以采访他了。
If you're lucky, as another person; if you're not so lucky, as a pig or a donkey or an ant or what have you.
幸运的话,转世为人,如果不幸运的话,可能会变成猪,驴,蚂蚁等等
And if you are going to get one of these, you are really lucky.
如果你买一台,那就真是幸运了。
Machiavelli said in that famous chapter 25, that the prince, if he is lucky, will master fortuna about half the time, only about 50% of the time.
马基雅维利在有名的第25章里说,君主,如果他幸运的话,可以在一半的时间里掌握命运,仅仅是50%的时间。
Now I look at that element. Is it the thing I'm looking for? If I'm really lucky, it is. If not, I look at the value of that point here and the thing I'm looking for. And for sake of argument let's assume that the thing I'm looking for is smaller than the value here.
现在我们瞧瞧指向的元素,它是我们找的值么?如果足够幸运,他就是,如果不是,我们比较指向的元素,同我们要找的元素,方便起见,假设要找的元素比这里的值要小。
Actually for that, I can just use, if I'm lucky, function F5, which didn't work, so let me try it again,here we go.
实际上这一次,我是想用用,如果我够幸运的话,用下F5,噢,怎么不灵,让我再试试,好了。
All right? A linear search, I start at the beginning of the list and walk all the way through it. All right, if I'm lucky and it's at the low end, If it's not, if it's at the far end, I've got to go forever, and you saw that last time where this thing paused for a little while while it actually searched a list this big.
如果很幸运就在开头,那运行起来很快,如果是在末尾,那就一直得走到头,上次看到了,如果搜索空间很大,程序都会暂停一会,好的,那我希望你们。
应用推荐