Question 1
EasyWhich two properties make a problem suitable for dynamic programming?
- A.
Sorting and searching
- B.
Recursion and loops
- C.
Overlapping subproblems and optimal substructure
- D.
Greedy choice and sorting
Show answer and explanation
Answer: C
DP stores answers to repeated subproblems and builds the optimum from optimal sub-solutions.