Mental Model
Place N queens on an NxN chessboard so that no two queens attack each other. We try positions row by row, backtracking when conflicts arise.
Analogy: Imagine seating N guests at N tables in a row, where no two guests can see each other directly across or diagonally. You try seating one guest per table, and if a conflict happens, you move the previous guest to a different seat.
Board (4x4) empty: . . . . . . . . . . . . . . . . . = empty cell Q = queen placed We place queens row by row from top to bottom.
