The basic situation of this algorithm is i==j. In this case, the longest backward subsequence of the string w [i: j+1] is only the character w [i], with a length of 1. If i<j and w [i]= W [j], then the longest palindrome subsequence of w [i: j+1] or the longest palindrome subsequence of w [i+1: j+1] or the longest palindrome subsequence of w [i: j]. In this case, the algorithm returns the maximum value of these two lengths.
đang được dịch, vui lòng đợi..
