dp求最长回文字串leetcode#5

状态转移方程:

p[i][i] = 1;p[i] = p[i+1] = 1(if s[i]=s[i+1])

p[i][j] = 1(if p[i+1][j-1]&&s[i]=s[j])

 

posted @ 2016-10-15 20:50  iEdson  阅读(128)  评论(0编辑  收藏  举报