|
|
| The stupid question is the question not asked | |
| PerlMonks |
Re: Generator of integer partitionts of nby eric256 (Parson) |
| on Aug 28, 2004 at 02:42 UTC ( #386541=note: print w/ replies, xml ) | Need Help?? |
|
I started with the assumption that the partition of 1 was [ [ 1 ] ] and that the partion of each larger one was each sub partion with 1 added to the end, and with one added to each element. Hmm that was more confusing than in my head. Well here, the partition of 2 is
Oh and I added in some code to stop it from accumulating duplicates. Updates: Thanks blockhead for noticeing some errors there ___________ Eric Hodges
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||