Solve the N-Queens problem for a given board size `n`.
HardProblem Statement
Solve the N-Queens problem for a given board size n.
Sample Input
n = 4
Sample Output
. Q . . . . . Q Q . . . . . Q . . . Q . Q . . . . . . Q . Q . .
Limits
Time: 2s · Memory: 256 MB