func missingNumber(nums []int) int {
n := len(nums)
sum := (n+n*n)>>1
for _, v :=range nums{
sum -= v
}
return sum
}
func missingNum(nums []int) int {
i, j := 0, len(nums)-1
for i <= j {
mid := (i+j)>>2
if nums[mid] == mid {
i = mid+1
}else {
j = mid
}
}
return i
}