« Gentoo Linux | Main | The Objectivism Research CD-ROM »

June 09, 2004

N-queens Solution

Heard about the 8-queens problem? I think most CS guys are familiar with it. I was generally trying to brush up with my C++, so I thought I'd try to generate the solutions to the 8-queens problem (there are 92 of them). Then I thought if I'm going for a solver might as well make it a generic one and so I wrote the following code to solve n-queens for any given n.

The source code can be found here : Windows & Linux

If you want some R&D, that is the ones in which I tried to find all possible permutations (which resulted in duplicates), then those can be found here: Windows & Linux. These programs are much slower than the previous one's.

Have fun with the code!!!

Posted by dpillay at June 9, 2004 11:46 PM

Comments

Post a comment




Remember Me?