Q. Which of the following statements is true about dynamic programming?
-
A.
It is only applicable to optimization problems
-
B.
It can be used for both optimization and counting problems
-
C.
It is always faster than greedy algorithms
-
D.
It requires a sorted input
Solution
Dynamic programming can be applied to both optimization and counting problems, making it versatile in problem-solving.
Correct Answer:
B
— It can be used for both optimization and counting problems
Learn More →
Showing 1 to 1 of 1 (1 Pages)