N Queens Visualizer

The n queens problem places n chess queens on an n × n board such that no two queens threaten each other. This means that no two queens share a row, column, or diagonal. Click on a queen to highlight the squares it can attack, to verify solutions.

This app uses a backtracking depth-first search algorithm to find and yield solutions, one at a time.