This is the very famous Eight Queens problem. This requires us to start with a standard chess-board and eight queens. The aim is to place the eight queens on board such that no queens can attack each other.
The above image is a screenshot of successful test cases for the challenge sets.
- We have chacked the safety of the board for each piece present or not.
- We have calculated every possible solution in our algorithm (Backtracking).
- We have comapred the generated solutions with every known possible solutions for further validity of our process.