my case 2 is showing run time
how to get rid of it
N QUEEN PROBLEM
@yyashu123
in the base case at line no 40
you should have to return true
as Problem is solved when base case hit
and from line(48-51)
this should be removed because we want to find all possible ans due to these line we get only one solution
i made the above changes yet i am getting the 2nd case run time error
this is because of
Constraints
1<=N<=11
so after making board of size 12 this will pass all testcases
modified code
sorry for late reply
your doubt was missed
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.