golang实现二分法查找
//二分法查找func Find(arr []int,val int)int{ if arr==nil{ return -1 } left:=0 right:=len(arr)-1 pos:=-1 var mid int for left<right{ mid=(right-left+1)/2+left if arr[mid] == val { for l...