我是 Go 的新手,这些问题让我很困惑。我无法解决它们,你们能帮我吗?
func Solution(A []int, B[]int, K int) int{
.......
res = MaxInt32
low = 0
high = Min(900, largestId) //largestId is limited here
mid = 0
while(low <= high){
mid = {low + high} / 2 55
if(isAvailable(K, mid)){
res := Min(res, mid)
high :=mid - 1
} else{
low := mid + 1
}
}
return res 64
} 65
错误显示:
workspace/src/solution/solution.go:55: syntax error: unexpected =, expecting }
workspace/src/solution/solution.go:64: non-declaration statement outside function body
workspace/src/solution/solution.go:65: syntax error: unexpected }
我不明白为什么会出现这些问题?
慕娘9325324
眼眸繁星
相关分类