mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-22 19:59:09 +08:00
Add automatic linter (#4214)
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user