Write a function to perform the N-Queens Problem (find all valid configurations for placing N queens on an NxN chessboard)
HardProblem Statement
Write a function to perform the N-Queens Problem (find all valid configurations for placing N queens on an NxN chessboard)
Sample Input
N = 4
Sample Output
[[.Q.., ...Q, Q..., ..Q.], [..Q., Q..., ...Q, .Q..]]
Limits
Time: 2s · Memory: 256 MB