1.

Consider the following dynamic programming implementation of the longest common subsequence problem: Which of the following lines completes the above code?

A. arr[i][j] = 1 + arr[i][j].
B. arr[i][j] = 1 + arr[i – 1][j – 1].
C. arr[i][j] = arr[i – 1][j – 1].
D. arr[i][j] = arr[i][j].View Answer
Answer» C. arr[i][j] = arr[i – 1][j – 1].


Discussion

No Comment Found

Related MCQs