N-queens

The N-Queens Problem is a classic combinatorial problem in which the goal is to place N queens on an N × N chessboard such that no two queens attack each other.

Rules for Placing N Queens:

  1. Only One Queen per Row: Each row must have exactly one queen.
  2. Only One Queen per Column: Each column must have exactly one queen.