//二分查找 function bin_sch($array, $low, $high, $k) { if ($low <= $high) { $mid = intval(($low + $high) / 2); if ($array[$mid] == $k) { return $mid; } elseif ($k < $array[$mid]) { return bin_sch($array, $low, $mid - 1, $k); } else { return bin_sch($arr…