Program for Implementation of N-Queen problem in Java

The n queens puzzle is the problem of placing eight chess queens on an n×n chessboard so that no two queens threaten each other. Thus, a solution requires that no two queens share the same row, column, or diagonal.

import java.util.*;
import java.lang.*;
class Queen
int x[]=new int[20];
void NQueen(int k,int n)
int i;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.