in reply to Algorithm for cancelling common factors between two lists of multiplicands
btw, are your sample solution arrays right?$i{$_}++ for (@a); $i{$_}-- for (@b); @c=grep { $i{$_} > 0 } keys @a; @d=grep { $i{$_} < 0 } keys @b;
In Section
Seekers of Perl Wisdom