Q.

Which of the following problems should be solved using dynamic programming?

A. mergesort
B. binary search
C. longest common subsequence
D. quicksort
Answer» C. longest common subsequence
Explanation: the longest common subsequence problem has both, optimal substructure and overlapping subproblems. hence, dynamic programming should be used the solve this problem.
1.9k
0
Do you find this helpful?
9

Discussion

No comments yet