NAME NQueens - A module to solve the N-Queens problem using the dancing links algorithm.

SYNOPSIS

use NQueens; my $nqueens = NQueens->new(8); my $solution_count = $nqueens->count_solutions(); my @solutions = @{$nqueens->find_solutions()};

DESCRIPTION

This module provides a way to solve the N-Queens problem using an exact cover approach with dancing links.

METHODS

new Constructor. Takes the number of queens as an argument.

count_solutions Returns the number of possible solutions for the N-Queens problem.

find_solutions Returns an array reference containing all possible solutions.

problem Returns the internal ExactCover::Problem object.