Place queens on an chessboard so no two queens attack each other. Queens attack along rows, columns, and diagonals. Return all distinct solutions.
This is LeetCode , the classic backtracking problem. You place queens row by row, checking constraints at each step.