3,217 views

Which type of algorithm is used to solve the "$8$ Queens" problem ?

1. Greedy
2. Dynamic
3. Divide and conquer
4. Backtracking

### 1 comment

Option D is correct

Backtracking algorithm is used to solve the 8 Queens problem.

8 Queens problem:

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.

FOR MORE DETAILS:-

https://www.codesdope.com/blog/article/backtracking-explanation-and-n-queens-problem/

1 vote