In binary search-- ah, there's that wonderful phrase, this is called a version of binary search just like you saw bin-- or bi-section methods, - when we were doing numerical things- in binary search, I need to keep track of the starting point and the ending point of the list I'm looking at.
就是当我们处理数字的时候,所称的二分检索,在二分法搜索中,我需要记录区间的开始点和尾点,初始化的时候就是-,问题输入的开始点和尾点,当我开始做测试的时候,我想要做的就是去取中值点。
Happiness is not a binary either-or, zero-one-- either I'm happy or I'm unhappy.
幸福不是二进制的非此即彼,0或-,要么幸福要么不幸福。
And a bit, B-I-T, just a shorthand for binary digit, 2 so a digit of zero over a one, bi means two, you only have two digits.
比特,B-I-T,是binary,digit的简写,从0到1的数字,而bi表示,所以你就只有两个数字。
But let's look a little more carefully at the code for binary search-- for search 1.
二分搜索算法的代码,那么search,1,这个方法的。
应用推荐