Loading algorithms…
Loading visualizer…
Place N queens on an N×N board so none attack each other. The canonical backtracking example — try, conflict, undo, retry.
4 total solutions exist for N=6 · showing the first search path
Slide N from 4 to 8 · Red ✕ marks attacked squares · Backtracking undoes dead ends automatically
Place N queens on an N×N board so none attack each other. The canonical backtracking example — try, conflict, undo, retry.