We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ee1489 commit dda0848Copy full SHA for dda0848
DynamicProgramming/LongestRepeatedSubsequenceProblem.java
@@ -5,7 +5,7 @@
5
6
The Recurrence is almost the same as LCS -
7
LRS[i][j] = 0 if i = 0 || j = 0
8
- = LRS[i-1][j-1] if (i != j) && s[i] == s[j]
+ = LRS[i-1][j-1] + 1 if (i != j) && s[i] == s[j]
9
= max(LRS[i-1][j], LRS[i][j-1]) if s[i] != s[j]
10
i and j can not have the same index as they represent the indixes of the same string.
11
0 commit comments