Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: More efficient way to get uniq list elements from list of listsby Aighearach (Initiate) |
on Nov 11, 2004 at 03:55 UTC ( [id://406905]=note: print w/replies, xml ) | Need Help?? |
In the first place you could have replaced push @vertices with $unique{ $edges[$i][$j] } = undef and then you don't have to mess with shoehorning @uniqv into a hash just to pull out the keys.
Abstracting out the edges and vertices, what I see is going on is, you have a list of lists, and you just want the elements that are unique across the whole thing. I would do something like:
-- Snazzy tagline here
In Section
Seekers of Perl Wisdom
|
|