For this example we'll use a 5 x 5 board because this size requires the fewest number of
tentative Queen placements (only 15) to reach the first solution to the puzzle.
A Queen shown in RED is obviously clashing with at least one previously-placed Queen.
It will be lifted off the board and set down again (or be "placed") in the next unoccupied square.
When a Queen is placed with no clashes on any row, we immediately move up to the next row.
Click thebutton below to continue placing Queens on this board,
and to watch how the Queen-placements are counted ...
0 Number of times that any Queen was placed tentatively
on the board, prior to discovery of the first solution.0 Number of times a Queen was placed on the board,
and was allowed to stay.0 Number of times a Queen was placed on the board, but was
clearly challenged by at least one previously-placed Queen.
Queen-placement example - Introduction
Clickto return to this site's Home page.
![]() |
CSP Queens - Analysis Of The N-Queens Puzzle © 1975 by
Colin S Pearson and Martin S Pearson is licensed under CC BY-NC-SA 4.0 Permissions beyond the scope of this license may be available via the feedback page. |
Page updated: 14 July 2025 |