CodeMosa
Master LeetCode Patterns
All Patterns
Collections
Sign In
Back
Subsequence DP
Question 1 of 12
8% Complete
Medium
LCS recurrence for strings A and B is...
A
If A[i]==B[j]: 1+LCS(i-1,j-1); else max(LCS(i-1,j), LCS(i,j-1))
B
1+LCS(i-1,j) always
C
A.length + B.length
D
Edit distance