style: enable MethodName in CheckStyle (#5182)

enabled: MethodName in CheckStyle
This commit is contained in:
Godwill Christopher
2024-05-27 01:06:06 -06:00
committed by GitHub
parent ea4dc15a24
commit 295e7436b1
53 changed files with 225 additions and 225 deletions

View File

@ -12,14 +12,14 @@ public final class LongestPalindromicSubsequence {
String a = "BBABCBCAB";
String b = "BABCBAB";
String aLPS = LPS(a);
String bLPS = LPS(b);
String aLPS = lps(a);
String bLPS = lps(b);
System.out.println(a + " => " + aLPS);
System.out.println(b + " => " + bLPS);
}
public static String LPS(String original) throws IllegalArgumentException {
public static String lps(String original) throws IllegalArgumentException {
StringBuilder reverse = new StringBuilder(original);
reverse = reverse.reverse();
return recursiveLPS(original, reverse.toString());