Coding Trainer
N-Queens
Problem
Place n queens on an n×n chessboard so no two queens attack each other. Return all distinct solutions.
Example: n=4 → [[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]]