在 Go 中找到两个整数之间的最小值的正确方法是什么?
我在我的程序中导入了数学库,我试图在三个数字中找到最小值:
v1[j 1] = math.Min(v1[j] 1,math.Min(v0[j 1] 1,v0[j] cost))其中 v1 声明为:
t := "stackoverflow"v1 := make([]int,len(t) 1)
但是,当我操作我的程序时,有以下错误:
./levenshtein_distance.go:36: cannot use int(v0[j 1] 1(type int) as ...