Program to solve n-queens problem

The program implements short bit of backtracking and finds all solutions possible
1K Downloads
Updated 9 Jul 2012

View License

syntax : [sol nsol]=nqueen(n)
sol ---> solution matrix (nsol x n)
nsol ---> number of solutions found

both outputs are optional

Cite As

Saket Dandawate (2026). Program to solve n-queens problem (https://uk.mathworks.com/matlabcentral/fileexchange/37420-program-to-solve-n-queens-problem), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0