N-Queens
Place n queens on an n x n chessboard such that no two queens attack each other. Return all distinct solutions.
N-Queens

Place n queens on an n x n chessboard such that no two queens attack each other. Return all distinct solutions.

Example 1:
Input: 4
Output: [[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]]
Input
arr =4

Start placing queens

01230123
Queens: 0/4
Variables
VariableValue
n4
DepthFunction Call
Stack empty
0/50