Solution 1: The N-Queens Problem

The solution to this problem involves a recursive backtracking search. However, care must be taken to not get duplicate solutions. To insure that we do not get duplicate sulutions, the method in the solutions does a recursion based on the row number of the chess board. The solutions also use a one dimensional array data type as the chess board representation.

Solutions are available in C and Java.


This version of the NQueens Java Applet will allow all values of N to be entered.

To be able to see this applet, you must have a Java capable browser.