This respository contains the Javascript solution for the N-Queen problem. The current solution utilizes the BFS concept and will be updated with A* algorithm.
- See the result by simply running
node main.js - See different
nsolution by modifyingvar solution = new Solution(4)intovar solution = new Solution(n);insidemain.js
https://codepen.io/akiara-nguyen/pen/ywKegm?editors=0110
* Q * *
* * * Q
Q * * *
* * Q *
* * * Q
Q * * *
* * Q *
* Q * * *
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* * * Q *
Q * * * *
* * Q * *
* * * * Q
* Q * * * *
* * * Q * *
* * * * * Q
Q * * * * *
* * Q * * *
* * * * Q *
* * * Q * *
* * * * * Q
Q * * * * *
* * Q * * *
* * * * Q *
* Q * * * * *
* * * * * * Q
* * * * Q * *
* * Q * * * *
Q * * * * * *
* * * * * Q *
* * * Q * * *
* * * * * * Q
* * * * Q * *
* * Q * * * *
Q * * * * * *
* * * * * Q *
* * * Q * * *
* Q * * * * * *
* * * Q * * * *
* * * * * Q * *
* * * * * * * Q
* * Q * * * * *
Q * * * * * * *
* * * * * * Q *
* * * * Q * * *
* * * Q * * * *
* * * * * Q * *
* * * * * * * Q
* * Q * * * * *
Q * * * * * * *
* * * * * * Q *
* * * * Q * * *