![]() |
|
Do you know where your variables are? | |
PerlMonks |
Re: Magic Squares Guessingby Ratazong (Monsignor) |
on Nov 03, 2011 at 07:49 UTC ( #935597=note: print w/replies, xml ) | Need Help?? |
I would create a data-structure consisting of
Then you could use a recursive algorithm like the following:
Once you have your basic algorithm, you can optimize. E.g. your selection-algorithms and your consistency-checks. That's when the real fun starts :-) (because you can add "intelligence" instead of pure "brute-force") Hope this helps! Rata (*) a basic selection-algorithm could be going from first to last.
In Section
Seekers of Perl Wisdom
|
|