Do you know where your variables are? | |
PerlMonks |
Queen's problem (was Re^2: How to debug a long while loop)by roboticus (Chancellor) |
on May 17, 2007 at 14:22 UTC ( [id://616006]=note: print w/replies, xml ) | Need Help?? |
nbezalla: I recalled another amusing chess puzzle--specifically the "queens problem". It's another one that's easily solved with recursion. It might be too much of a hint, so I've put spoiler tags on it (below) so you don't see the solution to it if you don't want to. Anyway, the queens problem (on the offhand chance that you're unfamiliar with it) is basically to place eight queens on a chessboard such that none can attack another. My solution is:
<Reveal this spoiler or all in this thread> ...roboticus
In Section
Seekers of Perl Wisdom
|
|