(n: int)
| 139 | |
| 140 | |
| 141 | def n_queens_solution(n: int) -> None: |
| 142 | boards: list[list[str]] = [] |
| 143 | depth_first_search([], [], [], boards, n) |
| 144 | |
| 145 | # Print all the boards |
| 146 | for board in boards: |
| 147 | for column in board: |
| 148 | print(column) |
| 149 | print("") |
| 150 | |
| 151 | print(len(boards), "solutions were found.") |
| 152 | |
| 153 | |
| 154 | if __name__ == "__main__": |
no test coverage detected