-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d370e6
commit 69f6146
Showing
4 changed files
with
83 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package dp.lcs; | ||
|
||
import java.util.Collections; | ||
|
||
public class LongestPallindromicSubsequence { | ||
|
||
public static void main(String[] args) { | ||
|
||
String s1 = "agbcba"; | ||
|
||
StringBuilder stringBuilder = new StringBuilder(); | ||
for (int i = s1.length() - 1; i >= 0; i--) { | ||
stringBuilder.append(s1.charAt(i)); | ||
} | ||
String s2 = stringBuilder.toString(); | ||
System.out.println("s1:"+s1); | ||
System.out.println("s2:"+s2); | ||
|
||
} | ||
|
||
private void lcs(String s1, String s2){ | ||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters