动态规划
给你一个字符串 s,找到 s 中最长的回文子串。
如果字符串的反序与原始字符串相同,则该字符串称为回文字符串。
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455public class Solution { public String longestPalindrome(String s) { int len = s.length(); if (len < 2) { return s; } int maxLen = 1; int begin = 0; // dp[i][j] 表示 s[i..j] 是否是回文串 boolean[][] dp = new boolean[len][len]; // 初始化:所有长度为 1 的子串都是回文串 f ...
Hello 金金
df41d53e78fc50c17c7c60086d7a211b3532f2aa390eaadd6c1fd338669763dd
您好, 这里需要密码.
我的第一篇博客文章
第一章
胡雄飞喜欢卢金英第二章
卢金英喜欢胡雄飞参考文献
www.CoderStarfeyfey.cn
Hello World
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment