when we have 2 x 2 chessboard so what will be the position of queen and i didn’t get how to compute the indices of diagonals to check if the queen pos is safe or not
Nqueen problem using recursion
@Vikaspal sorry my bad, no solution exists for n = 2. It must be given in the question what to print if a solution does not exist 
Do you have any other query?
yes I didn’t understand how the all the configuration is achieved ?. If one approach is that we can fill the queen rowbyrow and colbycol right , so two possible ways?
one question that when we have to for loop and inside that we have if condition which return true if condition met then so the code after the if condition is not going to execute ?
@Ishitagambhir thanks so if I use continue keyword after the return statement then the loop will be continue.
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.