Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@ -49,8 +49,7 @@ public class PalindromicPartitioning {
if (L == 2) {
isPalindrome[i][j] = (word.charAt(i) == word.charAt(j));
} else {
isPalindrome[i][j]
= (word.charAt(i) == word.charAt(j)) && isPalindrome[i + 1][j - 1];
isPalindrome[i][j] = (word.charAt(i) == word.charAt(j)) && isPalindrome[i + 1][j - 1];
}
}
}
@ -81,8 +80,7 @@ public class PalindromicPartitioning {
word = input.nextLine();
// ans stores the final minimal cut count needed for partitioning
int ans = minimalpartitions(word);
System.out.println(
"The minimum cuts needed to partition \"" + word + "\" into palindromes is " + ans);
System.out.println("The minimum cuts needed to partition \"" + word + "\" into palindromes is " + ans);
input.close();
}
}