N-queens minimum and knights and bishops: Difference between revisions
N-queens minimum and knights and bishops (view source)
Revision as of 14:30, 13 May 2022
, 2 years ago→{{header|Go}}: Improvement for knights.
(Oops!) |
(→{{header|Go}}: Improvement for knights.) |
||
Line 128:
=={{header|Go}}==
This was originally a translation of the Wren entry but was substantially improved by [[User:Petelomax|Pete Lomax]] using suggestions from the talk page and has been improved further since then, resulting in an overall execution time of about
Timing is for an Intel Core i7-8565U machine running Ubuntu 20.04.
Line 252:
}
if countSoFar <= maxCount {
si :=
sj :=
if piece
si =
sj =
if si < 0 {
si = 0
}
if sj < 0 {
sj = 0
}
}
for i := si; i < n; i++ {
Line 415 ⟶ 421:
. . . . . . . . . .
Took
</pre>
|