initialize helper matrices
for rr in range ( N ) : NEW_LINE INDENT for cc in range ( N ) : NEW_LINE INDENT slashCode [ rr ] [ cc ] = rr + cc NEW_LINE backslashCode [ rr ] [ cc ] = rr - cc + 7 NEW_LINE DEDENT DEDENT if ( solveNQueensUtil ( board , 0 , slashCode , backslashCode , rowLookup , slashCodeLookup , backslashCodeLookup ) == False ) : NEW_LINE INDENT print ( " Solution ▁ does ▁ not ▁ exist " ) NEW_LINE return False NEW_LINE DEDENT