Write the program to arrange the n queen(queen of chessboard) in n*n matrix such that they can not ATTACK TO eachother.
OUTPUT : In form of matrix of elements (0 and 1) where 1 is suitable position where can be keep without attack to each other. USED : Recursion , BACKTRACKING etc CHARACTERISTICS OF QUEEN : A )They can move in any position in a row where it is presence. B )They can move in any position in a column where it is presence. C )They can move in any position in a diagonal where it is presence. CONDITION : Arrange the queen such that they can not ATTACK to each other. in n*n matrix APPROCH : A )put a queen in a row than move next row to put the next queen in next row such that they can not ATTACK each other After matrix 4 they are not any place where a queen can be Put without attack by anyone so BACKTRACK occur here and reach again to Matrix 1 and then continue...