ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which method is used by line 4 of the above code snippet?
Correct Answer: D — Memoization
The array "sum" is used to store the previously calculated values, so that they aren't recalculated. So, line 4 uses the memoization technique.