[問題] longest palindrome subsequence
看板Prob_Solve (計算數學 Problem Solving)作者mqazz1 (無法顯示)時間13年前 (2011/11/04 21:09)推噓0(0推 0噓 3→)留言3則, 1人參與討論串1/2 (看更多)
A palindrome is a nonempty string over some alphabet that reads the same
forward and backward. Examples of palindromes are all strings of length 1,
civic, racecar, and aibohphobia (fear of palindromes)
input: A[1...n]
m[i+1,j-1] + 1 , if A[i] = A[j]
m[i,j] = max{ m[i,j-1], m[i+1,j] } , if A[i] != A[j]
請問這個遞迴式是甚麼意思?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.26.99
→
11/04 22:22, , 1F
11/04 22:22, 1F
→
11/04 22:23, , 2F
11/04 22:23, 2F
→
11/04 22:25, , 3F
11/04 22:25, 3F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
Prob_Solve 近期熱門文章
PTT數位生活區 即時熱門文章
-1
12