Skip to content

About

Implementation of N-Queens problem in Python

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

N Queens Problem

N - Queens problem is to place n queens in such a manner on an n x n chessboard that no queens attack each other by being in the same row, column or diagonal.

How to run

$ python3 main.py <board-size>

Example

$ python3 main.py 3
  No solution found

$ python3 main.py 4
  -----------------
  |   | 1 |   |   |
  -----------------
  |   |   |   | 1 |
  -----------------
  | 1 |   |   |   |
  -----------------
  |   |   | 1 |   |
  -----------------

About

Implementation of N-Queens problem in Python

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages