in reply to Re (tilly) 2: (Golf as well): List of Partitions
in thread (Golf as well): List of Partitions
Hmm, and we can shave that down to 71 chars:
sub P{ [@_],map{my$i=$_;grep{!grep$_>$i,@$_}map[$i,@$_],P($_[0]-$i)}1..$_[0]- +1 }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re (tilly) 4: (Golf as well): List of Partitions
by tilly (Archbishop) on May 07, 2001 at 01:04 UTC | |
by jynx (Priest) on May 07, 2001 at 09:39 UTC | |
by tilly (Archbishop) on May 07, 2001 at 15:35 UTC |
In Section
Seekers of Perl Wisdom