Quiz: LCS Recurrence

Test your understanding

Check Your Understanding

In LCS, if text1[i] == text2[j], what is LCS(i, j)?

  1. A.LCS(i-1, j) + LCS(i, j-1)
  2. B.max(LCS(i-1, j), LCS(i, j-1))
  3. C.1 + LCS(i-1, j-1)
  4. D.1 + max(LCS(i-1, j), LCS(i, j-1))
Start the roadmap to answer the quizzes and solve the challenges