in reply to Re: alternative to List::Compare
in thread List::Compare
BTW, I like the $h{$_} .= "a" idea. To scale it much larger, I'd probably go with a bit vector, something like this:
Of course, it's a bit more work to get the "only"s and "common"s out %(my @AoA = ( [1..10], [2..11], [3..12] ); my %h; foreach my $i ( 0..#@AoA ) { vec($h{$_},$i,1) = 1 for @{$AoA[$i]}; }
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|