style: format code (#4212)

close #4204
This commit is contained in:
acbin
2023-06-09 18:52:05 +08:00
committed by GitHub
parent ad03086f54
commit 00282efd8b
521 changed files with 5233 additions and 7309 deletions

View File

@ -77,13 +77,7 @@ public class EditDistance {
// ans stores the final Edit Distance between the two strings
int ans = minDistance(s1, s2);
System.out.println(
"The minimum Edit Distance between \"" +
s1 +
"\" and \"" +
s2 +
"\" is " +
ans
);
"The minimum Edit Distance between \"" + s1 + "\" and \"" + s2 + "\" is " + ans);
input.close();
}
@ -108,8 +102,7 @@ public class EditDistance {
return storage[m][n];
}
if (s1.charAt(0) == s2.charAt(0)) {
storage[m][n] =
editDistance(s1.substring(1), s2.substring(1), storage);
storage[m][n] = editDistance(s1.substring(1), s2.substring(1), storage);
} else {
int op1 = editDistance(s1, s2.substring(1), storage);
int op2 = editDistance(s1.substring(1), s2, storage);