标签:
using System; namespace AAA int end = i - 1; int middle = 0; int temp = array[i]; while (start <= end) if (array[middle] > temp)//要排序元素在已经排过序的数组左边 array[end + 1] = temp; } public static long DichotomySearch(long[] array, long key, long high, long low) if (high < low) middle = (low + high) / 2; if (array[middle] == key) |
标签:
原文地址:http://www.cnblogs.com/oreobyzf/p/5897929.html