Hi,
Moving away from the stories, I would like to share with you one of my favorite assignments, written more than a year back. The Eight queens problem.
The problem, as you might already be knowing, is to arrange 8 queens on a 8X8 chess board in a non attacking way.
My solution to the puzzle (exe file... no viruses :) ) can be got by clicking on the link below:
http://cvkrishnakumar.googlepages.com/EIGHTQNS.EXE
Source code in c++ is given at http://cvkrishnakumar.googlepages.com/EIGHTQNS.CPP
This uses the backtracking technique in placing the queens.
Hope you find it interesting. Please pardon the lack of comments. I would be grateful for any suggestions or comments to improve.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment