Skip to content

Simple program to solve the famous N-Queen problem using backtracking.

Notifications You must be signed in to change notification settings

mbilalakmal/NQueen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NQueen

NQueen is a python module for solving the famous N-Queen problem.

Installation

Clone the project.

git clone https://github.com/mbilalakmal/NQueen.git

To install dependencies from requirements.txt run:

pip install -r requirements.txt

Usage

import queen

size = 8 # size of the board
board = queen.Board(size) # creates a [size*size] board

is_solved = queen.place_queen(board) # returns True if solved.
if is_solved == True:
    board.describe() # prints the board to console

Authors

  • Muhammad Bilal Akmal

License

MIT

Acknowledgments

About

Simple program to solve the famous N-Queen problem using backtracking.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages