Help


from Wikipedia
« »  
Although a trade-off occurs ( i. e., space used is speed gained ), this differs from some other optimizations that involve time-space trade-off, such as strength reduction, in that memoization is a run-time rather than compile-time optimization.
Moreover, strength reduction potentially replaces a costly operation such as multiplication with a less costly operation such as addition, and the results in savings can be highly machine-dependent, non-portable across machines, whereas memoization is a more machine-independent, cross-platform strategy.

2.010 seconds.