mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 09:36:28 +08:00
Maintain the same semantics as other languages in n_queens.go (#1329)
This commit is contained in:
parent
d2d49551e3
commit
ee67d3e6a7
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ func backtrack(row, n int, state *[][]string, res *[][][]string, cols, diags1, d
|
||||||
|
|
||||||
}
|
}
|
||||||
*res = append(*res, newState)
|
*res = append(*res, newState)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
// 遍历所有列
|
// 遍历所有列
|
||||||
for col := 0; col < n; col++ {
|
for col := 0; col < n; col++ {
|
||||||
|
|
Loading…
Reference in a new issue