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
- N Queen in O(n) space
- Check if a Queen can attack a given cell on chessboard
- Number of cells a queen can move with obstacles on the chessborad
- Perfect Sum Problem
- m Coloring Problem | Backtracking-5
- Word Break Problem using Backtracking
- The Knight's tour problem | Backtracking-1
- Warnsdorff's algorithm for Knight’s tour problem
- Travelling Salesman Problem implementation using BackTracking
- Rat in a Maze Problem when movement in all possible directions is allowed