← Back to Algorithms

N-Queens Problem

Place N queens on an NxN chessboard such that no two queens threaten each other.

Normal
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.