Skip to content

Latest commit

 

History

History

N Queen Problem

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

The N Queen is the problem of placing N chess queens on an N×N chessboard so that no two queens attack each other.

The expected output is a binary matrix which has 1s for the blocks where queens are placed. For example, following is the output matrix for above 4 queen solution.

{ 0,  1,  0,  0}
{ 0,  0,  0,  1}
{ 1,  0,  0,  0}
{ 0,  0,  1,  0}