折半查找,二分法查找

static int binSearch(int value) { int upperBound, lowerBound, mid; upperBound = arr.Length-1; lowerBound = 0; while(lowerBound <= upperBound) { mid = (upperBound + lowerBound) / 2; if (arr[mid] == val
相關文章
相關標籤/搜索