(self, board, n, col, v, ans)
| 34 | ans.append(arr) |
| 35 | |
| 36 | def solve(self, board, n, col, v, ans): |
| 37 | if col == n: |
| 38 | self.addSol(board, n, ans) |
| 39 | return |
| 40 | |
| 41 | for row in range(n): |
| 42 | if self.isSafe(board, row, col): |
| 43 | board[row][col] = 1 |
| 44 | self.solve(board, n, col + 1, v, ans) |
| 45 | board[row][col] = 0 |
| 46 | |
| 47 | def solveNQueens(self, n): |
| 48 | board = [[0] * n for _ in range(n)] |
no test coverage detected