Pattern 22: LeetCode Interview Patterns24 sections · 736 units
Open in CourseQuiz: LCS Recurrence
Test your understanding
Check Your Understanding
In LCS, if text1[i] == text2[j], what is LCS(i, j)?
- A.LCS(i-1, j) + LCS(i, j-1)
- B.max(LCS(i-1, j), LCS(i, j-1))
- C.1 + LCS(i-1, j-1)
- D.1 + max(LCS(i-1, j), LCS(i, j-1))