I am here with you with another problem based upon back tracking. Its the Famous N Queen Problem.
Suppose we have a NXN matrix and we have N Queens. A Queen has a nature of attacking. If She is positioned at any cell then she can attack in all the four directions [Up,Bottom,Left,Right] and also can attack diagonally [Up-Left,Up-Right,Bottom-Left,Bottom-Right]
Friends if we have N Queens then we have solution for all the Natural numbers as values of N except 2 and 3.
Below is my solution to this problem. Code is in Java and its based upon Recursion and Back Tracking.