Count n queens, if condition board[row][col]=false

why board[row][col]=false used inside if condition,it should be outside of it. before when row=3 no block is safe
(that isItsafe function )returns false, we never go into that function

hello @Dhruv-Goyal-449223618988467
if(isItsafe((board,row,col)){
board[row][col]=true;
count=count+countNQueens(board,row +1);
board[row][col]=false;
}
if your doubt is regarding this then we use it for backtraking when we place a queen at board[row][col] then we mark it as true indicating that we have place a queen here.
and recursively call the countNQueens function but when we backtrack then we remove the queen placed in board[row][col] by marking it as true.