The eight queens problem is the problem of placing eight queens on an 8×8 chessboard such that none of them attack one another (no two are in the same row, column, or diagonal). More generally, the n queens problem places n queens on an n×n chessboard.

There are different solutions for the problem.

Backtracking | Set 3 (N Queen Problem)

Branch and Bound | Set 5 (N Queen Problem)

You can find detailed solutions at http://en.literateprograms.org/Eight_queens_puzzle_(C)

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

- N Queen Problem | Backtracking-3
- N Queen Problem using Branch And Bound
- Printing all solutions in N-Queen Problem
- N-Queen Problem | Local Search using Hill climbing with random neighbour
- Number of cells a queen can move with obstacles on the chessborad
- N Queen in O(n) space
- Check if a Queen can attack a given cell on chessboard
- The Knight's tour problem | Backtracking-1
- Warnsdorff's algorithm for Knight’s tour problem
- Maximum non-attacking Rooks that can be placed on an N*N Chessboard
- Count of all possible ways to reach a target by a Knight
- Construct a Matrix whose sum of diagonals for each square submatrix is even
- N-Queen Problem | Local Search using Hill climbing with random neighbour
- Check if any King is unsafe on the Chessboard or not