mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-20 18:24:49 +08:00
style: enable MethodName
in CheckStyle (#5182)
enabled: MethodName in CheckStyle
This commit is contained in:

committed by
GitHub

parent
ea4dc15a24
commit
295e7436b1
@ -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());
|
||||
|
Reference in New Issue
Block a user