Ignoring symmetries, 92 distinct solutions exist for an 8×8 board. Two solutions exist for smallest possible case, N=4, meaning 4 queens on a 4×4 board.
My solver code, written in C, uses bitwise operations to pack board solutions into a data structure composed of unsigned long
integers. This implementation has a limit of N ≤ 8 (64-bits), but could be extended to work beyond the 8×8 case. Successful board arrangements are appended to a linked list and printed upon completion of the main recursion.
Date: | May 2014 |
Role: | Developer |
Tags: | C, Recursion, Algorithms, Data Structures |
Repo: |