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.
首先调用一下搜索,就一步调用,看起来搜索是固定的,除非我不知道二分搜索的原理,那我们来看看二分搜索吧,所以让我们看看,第一行打印出来的内容。
We've got the code for b search up there.
代码在这儿。
But let's look a little more carefully at the code for binary search-- for search 1.
二分搜索算法的代码,那么search,1,这个方法的。
应用推荐