Require a linear table to be an ordered table. The time complexity is O(log n).
public int binarySearchStandard(int[] num, int target){
int start = 0;
int end = num.length - 1;
while(start <= end){
int mid = start + ((end - start) >> 1);
if(num[mid] == target)
return mid;
else if(num[mid] > target){
end = mid - 1;
}
else{
start = mid + 1;
}
}
return -1;
}