in reply to Re: Finding divisors from factors
in thread Finding divisors from factors
Thanks Rolf.
The powerset solution was mainly to point out this simple way. It does work -- one just needs to remove duplicates using a hash.
It looks like your solution is very similar to my followup, we just do the multiply through a little different. The time is pretty close, and both faster than my earlier solutions.
They also have the advantage of not doing excess computation, which is important when we move to bigints where every operation is expensive (with Math::BigInt at least).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Finding divisors from factors (updated)
by LanX (Saint) on Oct 09, 2014 at 09:19 UTC |