B: That's why I like balcony seats.
B:这就是为什么我喜欢楼厅的位子。
是的,我喜欢那些颜色。
B Yes, I like autumn and spring, too.
b是的,我也喜欢秋天,还有春天。
OK. So if I look at this code, first of all I'm calling search, it just has one call, so looks like search is constant, except I don't know what happens inside of b search. So I've got to look at b search.
首先调用一下搜索,就一步调用,看起来搜索是固定的,除非我不知道二分搜索的原理,那我们来看看二分搜索吧,所以让我们看看,第一行打印出来的内容。
Again I should have said first, index 0, the first one. I can similarly go in and say I'd like all the things between index 2 and index 4. And again, remember what a b c that does. Index 2 says start a 0. 1, 2. So a, b, c.
我还是要说一遍,索引为0的元素,是第一个元素,我可以要求返回索引,2和4之前的所有元素,请记住2,是从0开始的,那么0,1,2对应的是。
Well, it looks like I just stole my own implementation Y but I happen to call it A and B, instead of X and Y, and so here, what's going on?
嗯,看起来我刚好像盗用了我自己的实现,我碰巧叫它为A和B,代替X和,这里,发生了什么事?
应用推荐