摘要:
View Code //在有序数组中找出某个数字的位置#include<stdio.h>int binarySearch(int a[] , int length,int object){ int head=0,mid=0; int tail = length -1; while(head<tail) { mid = (head+tail)/2; if ( a[mid] > object) tail = mid -1; else if(a[mid]<object) ... 阅读全文