Loading practice questions
Which method is used by line 4 of the above code snippet?
(D) Memoization
Explanation:
The array "sum" is used to store the previously calculated values, so that they aren't recalculated. So, line 4 uses the memoization technique.