Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Algorithm for cancelling common factors between two lists of multiplicands

by ikegami (Patriarch)
on Aug 08, 2005 at 19:49 UTC ( [id://481993]=note: print w/replies, xml ) Need Help??


in reply to Re: Algorithm for cancelling common factors between two lists of multiplicands
in thread Algorithm for cancelling common factors between two lists of multiplicands

This works whether the arrays contain duplicate elements or not:

my %a = map { $_ => 1 } @a; my %b = map { $_ => 1 } @b; @c = grep { !$b{$_} } @a; @d = grep { !$a{$_} } @b;
  • Comment on Re^2: Algorithm for cancelling common factors between two lists of multiplicands
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2024-04-21 20:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found