Format code with prettier (#3375)

This commit is contained in:
acbin
2022-10-03 17:23:00 +08:00
committed by GitHub
parent 32b9b11ed5
commit e96f567bfc
464 changed files with 11483 additions and 6189 deletions

View File

@ -24,7 +24,6 @@ public class LongestPalindromicSubstring {
int start = 0, end = 0;
for (int g = 0; g < input.length(); g++) {
for (int i = 0, j = g; j < input.length(); i++, j++) {
if (g == 0) {
arr[i][j] = true;
} else if (g == 1) {
@ -34,8 +33,9 @@ public class LongestPalindromicSubstring {
arr[i][j] = false;
}
} else {
if (input.charAt(i) == input.charAt(j) && arr[i + 1][j - 1]) {
if (
input.charAt(i) == input.charAt(j) && arr[i + 1][j - 1]
) {
arr[i][j] = true;
} else {
arr[i][j] = false;
@ -50,5 +50,4 @@ public class LongestPalindromicSubstring {
}
return input.substring(start, end + 1);
}
}