Skip to content

Commit 929ce5d

Browse files
minor change
1 parent 4c6cc66 commit 929ce5d

File tree

1 file changed

+6
-1
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+6
-1
lines changed

src/main/java/com/fishercoder/solutions/_516.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
public class _516 {
2323

2424
/**Inspired by https://discuss.leetcode.com/topic/78603/straight-forward-java-dp-solution*/
25-
public int longestPalindromeSubseq(String s) {
25+
public static int longestPalindromeSubseq(String s) {
2626
int[][] dp = new int[s.length()][s.length()];
2727
for (int i = s.length()-1; i >= 0; i--) {
2828
dp[i][i] = 1;//initialization
@@ -37,4 +37,9 @@ public int longestPalindromeSubseq(String s) {
3737
return dp[0][s.length()-1];
3838
}
3939

40+
public static void main(String... args) {
41+
longestPalindromeSubseq("bbbab");
42+
System.out.println("Done.");
43+
}
44+
4045
}

0 commit comments

Comments
 (0)