
5 Mar
2004
5 Mar
'04
5:01 a.m.
David Sankel wrote:
Try this Queens.hs
Thanks for the program, but how does one decipher the output?
The Nth item in each list is the column of the queen which is in row N
(or the row of the queen which is in column N; the transpose of a
valid solution must also be a valid solution).
If you prefer (row, column) pairs, use e.g.:
main = print $ map (zip [1..]) $ queens 10
--
Glynn Clements