my_N_Queen_problem

Below is the link of code which I have written for solving the N Queen Problem.
By this code I am getting all the intermediate steps of solving the problem as my output. I want to keep column(int j) as one of the parameters of my N_Queen function. Please help me to give a better solution for the same

Line No 44 - Change if(j>n) to if(j>=n)

We are using 0 indexing for our matrix so we need to backtrack as soon as our column no. becomes equal to n i.e. exceeds our matrix size.

Thank you for your help.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.