• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | GATE-CS-2009 | Question 54

Consider the data given in the previous question. The values of l(i, j) could be obtained by dynamic programming based on the correct recursive definition of l(i, j) of the form given above, using an array L[M, N], where M = m+1 and N =n+1, such that L[i, j] = l(i, j). Which one of the following statements would be TRUE regarding the dynamic programming solution for the recursive definition of l(i, j)?

(A)

All elements L should be initialized to 0 for the values of l(i,j) to be properly computed

(B)

The values of l(i,j) may be computed in a row major order or column major order of L(M,N)

(C)

The values of l(i,j) cannot be computed in either row major order or column major order of L(M,N)

(D)

L[p,q] needs to be computed before L[r,s] if either p < r or q < s.

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments