/n-queens-solution

Solution for the n-queen problem with all the solutions being displayed and the number of solutions.

Primary LanguageC++

n-queens-solution

Solution for the n-queens problem with all the solutions being displayed and the number of solutions using backtracking and recursion.

How to use?

Enter the number of queens and the run nqueen.cpp to get all the possible solutions as well as its count.

Note: The solution for the n-queens problem increases drastically with the increase in the n value, so it might take a while for large values of n.