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.

Algorithms :

Check the following links

1. http://www.mactech.com/articles/mactech/Vol.13/13.12/TheEightQueensProblem/
2. http://yuval.bar-or.org/index.php?item=9
3. http://firefang.net/english/n-queens
4. http://bridges.canterbury.ac.nz/features/eight.html
5. http://mathworld.wolfram.com/QueensProblem.html

for algorithm to solve this problem.

Source Code :

The solved java program is available here.