N-queens problem: Difference between revisions
m
→{{header|Uiua}}: Tweaked the algorithm
m (→{{header|Uiua}}: Tweaked the algorithm) |
|||
Line 16,701:
`Good` checks that a (maybe partial) solution is valid, by checking that each number is unique, each number+index is unique and each number-index is unique.
Starts with an empty array of values, and
<syntaxhighlight lang="Uiua">
N ← 8
Good ← =1⧻◴[
</syntaxhighlight>
{{out}}
<pre>
92
╭─
╷ "
╷ "
"
"
"
"
"
"
"
"
"
"
"
"
"
"
...etc...
</pre>
|