Board:4x4
1x
Recursion & Backtracking

N-Queens Algorithm

Step 1 of 6

A classic combinatorial problem that demonstrates the power of recursive trial-and-error (Backtracking).

The Objective

Place N queens on an N×N board such that no two queens attack each other. This means no two queens can be in the same row, column, or diagonal.

Q
Queen
Under Attack