必会算法:冒泡排序、快排、归并排序、折半查找、大根堆(Java版)
//二分查找
static int binaryFind(int[] n, int key, int left, int right) {
if (left > right) {
return -1;
}
int low = left;
int high = right;
int mid = 0;
while (low <= high) {
mid = (lo
原创
2017-03-03 21:17:45 ·
708 阅读 ·
0 评论