Help with debugging

prob: N-queens

sol: https://ide.codingblocks.com/s/396872

it is running properly but giving the wrong output pl tell what is wrong

Hello @raghav007 please wait i will check your code and let you know the mistake.

@raghav007 check this code:


you were not even defining the array in the correct manner:
if you have any further doubt you can ask here:
Happy Learning!!

I made some changes in the ifPossible function and it is working fine now didn’t need to change the array

@raghav007 this i if your changes are workig fine now then it is very good.
i thought it to be making changes at some positions.
but it is fine if you are making change at certain position only.
Happy Learning!!

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.