写正确程序须要注意的地方:一个数组是有一个递减数列座椅若干位造成的,在这种数组中查找某一个数。

//4,3,2,1,10,9,8,7,6,5 int searchInRotateSortedArray(int* arr, int count, int value) { if (count<=0 || arr==NULL) return -1; int mid; int left=0; int right=count-1; while (left<=right) { //
相关文章
相关标签/搜索