
23 Apr
2007
23 Apr
'07
7:36 p.m.
Dan Drake wrote:
This is combinatorics, so I can't just say "oh, this is small" and cross it off like physicists do. :)
Binary splitting is much faster than the naive approach, but still easy to understand. That's fac1 in the attached file. I ran out of time to write an efficient implementation using swing numbers, but my slow, crummy version is present as fac2, just as a data point.