Question: (a) A cheap solution is, let y be the reverse of x, and apply the standard Longest Common Subsequence (LCS) algorithm to x and y.
(a) A cheap solution is, let y be the reverse of x, and apply the standard Longest Common Subsequence (LCS) algorithm to x and y. This approach is numerically correct, but flawed, since the character locations for a LCS in x and y does not have to reference the same sequence of physical characters. Suppose x is ZABZA, what are the LCS for x and its reverse? How many are they? Are they all palindrome
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
