Please tell me what is the problem in my code for the N-Queen problem.
Doubt in N-Queen Problem
hello @sahilkhan2312000131
there are so many mistakes in ur canplace function
a) u are using || in place of &&
b) u are checking of arr[i][j]==2 but ur array will never have value 2
c) ur ar checking arr[t][i] in pace of arr[t][j]
chekc now->
I think you have send some wrong link of code
I have one query: In the recursive case where we have used loop for j, is there any way in which we can do this question without using this loop??
yes, u can.
then u need to pass j as argument to ur recursive function
check now->
u havent added else section
code is not giving any output…please check
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.