if( high < low) return -1; //找不到 int middle = (low + high) / 2; //二分 if( x < s[middle]) //关键字小于中值,继续二分查找,并将上限改为middle BinarySearch(s, x, low, middle - 1); else if( x > s[middle]) //关键字大于中值,继续二分查找,并将下限改为middle BinarySearch(s, x, middle + 1, high); else