Remove unnecessary code (#4141)

This commit is contained in:
Saurabh Rahate
2023-04-03 20:05:59 +05:30
committed by GitHub
parent 805f09850c
commit ad72c28d91
64 changed files with 125 additions and 322 deletions

View File

@@ -30,10 +30,7 @@ class LongestCommonSubsequence {
if (arr1[i - 1].equals(arr2[j - 1])) {
lcsMatrix[i][j] = lcsMatrix[i - 1][j - 1] + 1;
} else {
lcsMatrix[i][j] =
lcsMatrix[i - 1][j] > lcsMatrix[i][j - 1]
? lcsMatrix[i - 1][j]
: lcsMatrix[i][j - 1];
lcsMatrix[i][j] = Math.max(lcsMatrix[i - 1][j], lcsMatrix[i][j - 1]);
}
}
}