VISUALGO
//
Problems
Playground
Learn
/
Playground
Backtracking
N-Queens
VISUALGO
//
BACKTRACK
n-queens · backtracking trace console · O(n!)
Goal:
Place
8
queens on a 8×8 board so no two queens threaten each other (same row, column, or diagonal).
SPEED — 10
RUN
BOARD SIZE (N)
SET
READOUT
step
0 / 33496
row
0
solutions
0
status
IDLE