前端企业面试题:企业真实案例——29
实现一个二分法查找var searchInsert = function(nums, target) { //确定左右边界索引 let min = 0; let max = nums.length-1; while(min <= max) { let midIndex = (min+max)>>1; //向右移位,等价于除以2取整 //找到了直接返回 if( target == nums[