I'd probably go for a recursive subroutine, although there's the possibility for an iterative solution as well.
As for the N-queens problem, it basically is the recursive subroutine, except molded to fit the regexp syntax. And the only reason I did this exercise was "because I can". I don't think I would easily do such a thing in production code.
Abigail
In reply to Re: Detecting transpositions
by Abigail-II
in thread Detecting transpositions
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |