[問題] longest palindrome subsequence
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 篇):