Eight Queen Puzzle (likewise N Queen)
Problem
Write an algorithm to print all ways of arranging eight queens on a chess board so that none of them share the same row, column or diagonal.
(image courtesy)
Solution
This is a classic problem to implement using backtracking. It has 92 distinct solutions. If solutions that differ only by symmetry operations (rotations and reflections) of the board are counted as one, the puzzle has 12 fundamental solutions.
[Read More]