php二分查找法
?
?function bin_sch($array,$low,$heigh,$k){
??if($low <= $heigh){
???$mid = intval(($low + $heigh)/2);
???
???if($array[$mid] == $k){
????return true;
???}else if($k <$array[$mid]){
???return bin_sch($array, $low, $mid-1 、$k);
???}else {
????return bin_sch($array, $mid+1, $heigh, $k);
???}
? ?}
?}
?>