Search
⌘K

Leetcode 51. N-Queens

Place n queens on an n×n chessboard so no two queens share a row, column, or diagonal, and return all distinct board configurations. This is a classic combinatorial search / backtracking problem that explores permutations with diagonal pruning (n ≤ 9).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.