Problem - N-Queens

Place nn queens on an n×nn \times n chessboard so no two queens attack each other. Queens attack along rows, columns, and diagonals. Return all distinct solutions.

This is LeetCode 5151, the classic backtracking problem. You place queens row by row, checking constraints at each step.