In dynamic programming, what is the 'optimal substructure' property?
-
The optimal solution can be constructed from optimal solutions of its subproblems
-
The problem can be solved in linear time
-
The solution requires sorting the input data
-
The problem can be solved using a greedy approach