Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solve the "N Queens" problem #148

Open
julianhyde opened this issue May 20, 2022 · 0 comments
Open

Solve the "N Queens" problem #148

julianhyde opened this issue May 20, 2022 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

Solve the N Queens problem. There is a program in Standard ML at Rosetta Code but Morel currently throws StackOverflowError for n > 7.

For n = 8, the program generates the solution (8,4),(7,2),(6,7),(5,3),(4,6),(3,8),(2,5),(1,1)

 .  .  X  .  .  .  .  .
 .  .  .  .  .  X  .  .
 .  .  .  X  .  .  .  .
 .  X  .  .  .  .  .  .
 .  .  .  .  .  .  .  X
 .  .  .  .  X  .  .  .
 .  .  .  .  .  .  X  .
 X  .  .  .  .  .  .  .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant