Closed Aashi19234 closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
solve-it | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Feb 2, 2024 4:42pm |
Good try! The solution is almost there, just a minor mistake is keeping from working correctly. The solution does not solve the N queen problem as for a chess board of size 8, 8 queens have to be placed. The error lies in the backtracking part of the solve function, do not use the clearQueens function there to do the backtracking, try undo-ing the placeQueen function to make the backtracking part. Also, try implementing a checker board pattern for the chess board, to simulate an actual chess board. @Aashi19234
@Spandan-Bhattacharya Thank you for your suggestion, I would make the desired changes and issue the PR.
I have added a N-Queen problem Solver, which aims to place the queens in such a way that no two queens threaten each other.
https://github.com/Spandan-Bhattacharya/Solve_it/assets/140010647/0b8e72d3-a195-4938-ae4f-89c6b0632acd