Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: better union of sets algorithm?

by RazorbladeBidet (Friar)
on Mar 11, 2005 at 15:20 UTC ( [id://438670]=note: print w/replies, xml ) Need Help??


in reply to Re^2: better union of sets algorithm?
in thread better union of sets algorithm?

so, for example (to clarify):

my @a = qw( 1 2 3 3 2 ); my @b = qw( 1 4 5 5 4 ); my @c = qw( 1 6 7 7 6 );


should give back
1 2 3 4 5 6 7


right? basically you could make one big list and find the uniques from that?
--------------
It's sad that a family can be torn apart by such a such a simple thing as a pack of wild dogs

Replies are listed 'Best First'.
Re^4: better union of sets algorithm?
by perrin (Chancellor) on Mar 11, 2005 at 15:32 UTC
    That's right, except the lists are sets, i.e. they have no dupes internally, and they are already individually sorted.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://438670]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (1)
As of 2024-04-25 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found