Question: i. Describe and analyze an algorithm to nd the longest subsequence of a given string that is also a palindrome. For example, the longest palindrome
i. Describe and analyze an algorithm to nd the longest subsequence of a given string that is also a palindrome. For example, the longest palindrome subsequence of MAHDYNAMICPROGRAMZLETMESHOWYOUTHEM is MHYMRORMYHM.
ii. What subproblems will your algorithm solve?
iii. Give a recursive formula for a given subproblem in terms of smaller subproblems.
iv. Explain the correctness of your algorithm.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
