返回首页
最长回文子串
LeetCode 经典 150
多维动态规划
难度:
中等
题目描述
找到字符串中的最长回文子串。
解题思路
使用动态规划,递推公式为 dp[i][j] = dp[i+1][j-1] && s[i] == s[j]。