NQueenProblem.java
/* 8 queen problem is solved using Backtracking recursively.
	The NQueenProblemSolve function returns false if queens
	cannot be placed, else,it returns true and prints placement of queens
	and empty in the form of 1s and 0s. */
8 queen problem is solved using Backtracking recursively.
The NQueenProblemSolve function returns false if queens
cannot be placed, else,it returns true and prints placement of queens
and empty in the form of 1s and 0s.
8 queen problem is solved using Backtracking recursively . The NQueenProblemSolve function returns false if queens cannot be placed else it returns true and prints placement of queens and empty in the form of 1s and 0s .
boolean solveNQ()
	{
	int chessBoard[][] = new int[N][N];
	if (NQueenProblemSolve(chessBoard, 0) == false) {
	System.out.print("Solution does not exist");
	return false;
	}
	printSolution(chessBoard);
	return true;
	}
boolean solveNQ ( ) { int chessBoard [ ] [ ] = new int [ N ] [ N ] ; if ( NQueenProblemSolve ( chessBoard , 0 ) == false ) { System . out . print ( "Solution does not exist" ) ; return false ; } printSolution ( chessBoard ) ; return true ; }
8 queen problem is solved using Backtracking recursively.
8 queen problem is solved using Backtracking recursively .