- or download this
my ($x, $y)
= find_best_partition(map int(rand(1000)), 1..100);
- or download this
sub find_best_partition {
# We're going to try to find partitions that add up to each possible
...
return (\@part_1, \@part_2);
}
- or download this
sub find_best_partition {
my @numbers = sort {abs($b) <=> abs($a) or $a <=> $b} @_;
...
return (\@part_1, \@part_2);
}