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

pull/1335/head
huangjikun 7 months ago committed by GitHub
parent d2d49551e3
commit ee67d3e6a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save