mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 16:19:46 +08:00
Maintain the same semantics as other languages in n_queens.go (#1329)
This commit is contained in:
@@ -15,6 +15,7 @@ func backtrack(row, n int, state *[][]string, res *[][][]string, cols, diags1, d
|
||||
|
||||
}
|
||||
*res = append(*res, newState)
|
||||
return
|
||||
}
|
||||
// 遍历所有列
|
||||
for col := 0; col < n; col++ {
|
||||
|
||||
Reference in New Issue
Block a user