in reply to The N-queens problem using pure regexes
Bravo! Very neat solution. And, a beautiful demonstration of the fact that the right data structure isn't just important, it's everything.
Also, I like the heavy usage of map and grep. A little harder to read at first (as a programmer who's functional at play, not at work), but very concise.
Question - how does the regex engine not choose a free square in d4 when looking for free squares in d3? I'm guessing it has to do with [\x00-\xFF]*, but I'm not positive as to how that's working ...
------
We are the carpenters and bricklayers of the Information Age.
The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: The N-queens problem using pure regexes
by Abigail-II (Bishop) on Oct 09, 2003 at 09:04 UTC | |
by dragonchild (Archbishop) on Oct 09, 2003 at 13:10 UTC | |
by Abigail-II (Bishop) on Oct 09, 2003 at 13:18 UTC |
In Section
Meditations