-
Notifications
You must be signed in to change notification settings - Fork 0
aarigela/N-Queens-Problem
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
nQueens.py : Solve the N-Queens problem The N-queens problem is: Given an empty NxN chessboard, place N queens on the board so that no queen can attack any other, i.e. such that no two queens share the same row, column or diagonal. Sample output :- [<username> ~]$ py nQueens.py 8 _ _ _ _ Q _ _ _ _ _ _ _ _ _ Q _ _ Q _ _ _ _ _ _ _ _ _ _ _ Q _ _ _ _ Q _ _ _ _ _ Q _ _ _ _ _ _ _ _ _ _ Q _ _ _ _ _ _ _ _ _ _ _ Q Here, Q's indicate the positions of queens on the board.
About
Contains solution for N-Queens Problem in Python running in O(N) time
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published