Eight Queens Puzzle
The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture any other using the standard chess queen's moves.
Available movement of the Queen is shown in above picture. The queens must be placed in such a way that no two queens attack each other. In chess, a queen can move as far as horizontally, vertically, or diagonally. The standard 8 by 8 Queen's problem asks how to place 8 queens on an ordinary chess board so that none of them can hit any other in one move.
This puzzle has twelve unique solution. The following image show one solution as using backtracking algorithm method. See wikipedia for more details about 8 Queen puzzle.
Check the following links
for algorithm to solve this problem.
Source Code :
The solved java program is available here.