We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bf0fe0 commit 196fcb3Copy full SHA for 196fcb3
DynamicProgramming/LongestPalindromicSubsequence.java
@@ -22,11 +22,11 @@ private static String LPS(String original) {
22
StringBuilder reverse = new StringBuilder();
23
reverse.append(original);
24
reverse = reverse.reverse();
25
- return recursiveLPS(original, reverse);
+ return recursiveLPS(original, reverse.toString());
26
}
27
28
private static String recursiveLPS(String original, String reverse) {
29
- String bestResult = ""
+ String bestResult = "";
30
31
//no more chars, then return empty
32
if(original.length() == 0 || reverse.length() == 0) {
0 commit comments