N QUEEN PROBLEM

TLE

ABORTING COMMAND

https://ide.codingblocks.com/s/339999 Now incorrect output.

hello @mverma_be19 the error was that you have to write these lines
bool nextqueen=solveNqueen(board,i+1,n);

    if(nextqueen)

    {

        return true;

    }

    //If not true means (i,j) is not the right position-Assumption is wrong

    board[i][j]=0; //BACKTRACK

only when if it is possible .
corrected code is https://ide.codingblocks.com/s/340041
if you still have any doubt you can ask here.
if you feel your doubt is cleared please mark the doubt as resolved .
Happy Learning !!

I have already written this line. Plz check line 76. https://ide.codingblocks.com/s/339999

@mverma_be19 you have not read what i have wriiten above .
i said that you have to write these lines only when if it is possible to place the present queen properly otherwise not .
please check the code link which i gave you above .


again i have shared the corrected code with you .
please see your mistake here.