Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
dspeyer
14y ago
0 comments
Save
Share
Factorials risk integer overflow in the intermediate calculations, though something similar can work.
0 comments
1 comments · 1 top-level
top
newest
oldest
Bootvis
14y ago
Yes, it seems a number of optimizations are possible. At least it is not necessary to calculate n!. Depending on the job discussing these strategies and whether they are worthwhile for some real world problem can be quite interesting.
j
/
k
navigate · click thread line to collapse