public static int binarySearch(int[] sortedArr , int target){
int start = 0;
int end = sortedArr.length - 1;
do{
int mid = (start + end)/2;
if(target > sortedArr[mid]){
start = mid+1;
}else if (target < sortedArr[mid]){
end = mid - 1;
}else{
return mid;
}
}while(start != end);
// 未找到
return -1;
}