Skip to content

The project's aim is to solve famous "N-Queens" problem and visualize one of the solution boards.

License

Notifications You must be signed in to change notification settings

sisgandarli/n-queens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

N-Queens

The project's aim is to solve famous "N-Queens" problem and visualize one of the solution boards. The algorithm used to solve this constraint satisfaction problem is called backtracking search algorithm.

Usage

  1. Download the project
  2. Import the project to a Java IDE (Intellij IDEA is preferred)
  3. Build the project and run it
  4. Write the number of queens in the text box
  5. Click "Run!" button
  6. See the result
    • If your input was not correct (empty box or non-numeric characters) you will see an error message
    • Else if your input is larger than 19, you will receive a message informing that the number is too large. This constraint is used because of time complexity of backtracking search algorithm
    • Else you will see one of the solution boards of famous "N-Queens" problem

Result

Here is one of the solution boards for 8 queens:

board

License

MIT licensed

Copyright © 2017 Shahnur Isgandarli, @sisgandarli

About

The project's aim is to solve famous "N-Queens" problem and visualize one of the solution boards.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published