Skip to content

Asaf-Alber/Queen-Puzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ‘‘ N-Queens Puzzle Solver in C

This project implements a recursive backtracking solution to the classic N-Queens problem. It finds valid configurations where N queens can be placed on an NΓ—N chessboard such that none attack each other.

πŸ”§ Features

  • Solves the N-Queens puzzle using recursion and backtracking.
  • Prints the board with queen positions.
  • Written in C for educational purposes.

πŸš€ How to Run

  1. Clone the repository:
git clone https://github.com/Asaf-Alber/Queen-Puzzle.git
cd Queen-Puzzle
  1. Compile the code:
gcc queens.c -o queens
  1. Run the program:
./queens

πŸ§ͺ Example Output

Q . . . . . . .
. . . . Q . . .
. . . . . . Q .
. . . Q . . . .
. . . . . Q . .
. Q . . . . . .
. . . . . . . Q
. . Q . . . . .

πŸ‘¨β€πŸ’» Author

Created by Asaf Alber

πŸ“„ License

This project is licensed under the MIT License.

About

Solves the 8-Queens problem in C using recursion and backtracking.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages