Maintain the same semantics as other languages in n_queens.go (#1329)

This commit is contained in:
huangjikun
2024-05-03 19:40:59 +08:00
committed by GitHub
parent d2d49551e3
commit ee67d3e6a7

View File

@@ -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++ {