3 ms·
I like the idea of hybrid. Since the value of a factorial depends on the factorial of the previous 2 numbers. Cache fact(n) and fact(n-1) for a selection of n
by ape4 11y ago
I like the idea of hybrid. Since the value of a factorial depends on the factorial of the previous 2 numbers. Cache fact(n) and fact(n-1) for a selection of n's. eg n = 10, 100, 1000, 10000, ...