← Back to Algorithms
N-Queens Problem
Place N queens on an NxN chessboard such that no two queens threaten each other.
Board Size:
Animation Speed:
Normal
Visualize
Reset
Random Input
← Previous
Play
Next →
Step 0 of 0
Time Complexity:
O(N!)
Space Complexity:
O(N)
How it works
Place N queens on an NxN chessboard such that no two queens threaten each other.