Skip to content

A tool to visualize every solution of the n queens problem.

Notifications You must be signed in to change notification settings

emaurel/The-n-queens-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The-n-queens-problem

A tool to visualize every solution of the n queens problem.

How to use it

make then execute n_queens_solutions with a parameter n, representing the size of the chessboard and it prints all the possible solutions.

Example

 make ; ./n_queens_solutions 4

returns :

 0  0  1  0 
 1  0  0  0 
 0  0  0  1 
 0  1  0  0 

 0  1  0  0 
 0  0  0  1 
 1  0  0  0 
 0  0  1  0 

number of solutions : 2

Edge cases

The program works well for chessboard up to 10*10, putting higher numbers will significantly increase the computing time.

About

A tool to visualize every solution of the n queens problem.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published