GATE 2009 CS – Question 54
A subsequence deletes any number of elements while preserving order. X[m], Y[n] are sequences of lengths m, n, indexed from0. Let l(i, j) be their prefix LCS length: l=0 if i=0 or j=0; l=expr1 if i, j>0 and X[i−1]=Y[j−1]; l=expr2 if i, j>0 and X[i−1]≠Y[j−1]. Dynamic programming uses L[M, N], M=m+1, N=n+1, with L[i, j]=l(i, j). Which statement is TRUE?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (C) l(i, j) can be computed in either row-major or column-major order.
Explanation
We are sorry we couldn't write detailed soluition for this, we are working on it!, please consider asking your own AI, its just 2-3 clicks with very minimum effort