return fibo_terms[n][/code]
Which property is shown by line 7 of the above code?
A. Optimal substructure
B. Overlapping subproblems
C. Both overlapping subproblems and optimal substructure
D. Greedy substructure
Answer: A
Explanation: We find the nth fibonacci term by finding previous fibonacci terms, i.e. by solving subproblems. Hence, line 7 shows the optimal substructure property.