InterviewSolution
Saved Bookmarks
| 1. |
What is the length of the longest palindromic subsequence for the string “ababcdabba”?(a) 6(b) 7(c) 8(d) 9I have been asked this question in unit test.Origin of the question is Longest Palindromic Subsequence topic in section Dynamic Programming of Data Structures & Algorithms II |
|
Answer» RIGHT answer is (b) 7 To EXPLAIN: The LONGEST palindromic SUBSEQUENCE is “abbabba” and its length is 7. |
|