Which technique is used by line 7 of the above code?
Greedy
Recursion
Memoization
Overlapping subproblems
Answer and explanation
Line 7 stores the current value that is calculated, so that the value can be used later directly without calculating it from scratch. This is memoization.
