N-queen runtime error, not working for some test cases


This is my code. It is showing runtime error for n=4,5,6 and not working at all for n=3,9 and showing error. Why is it so?

Hello @shruthi019,

Earlier your code was giving run-error for n=4.
Now, i have corrected it:
Modification:
int board[n][100]={0};

Hope, this would help.
Give a like if you are satisfied.

1 Like