1.

For which of the following, the length of the string is not equal to the length of the longest palindromic subsequence?(a) A string that is a palindrome(b) A string of length one(c) A string that has all the same letters(e.g. aaaaaa)(d) Some strings of length twoThis question was addressed to me in an international level competition.This is a very interesting question from Longest Palindromic Subsequence topic in chapter Dynamic Programming of Data Structures & Algorithms II

Answer»

The CORRECT choice is (d) Some strings of length two

The explanation is: A STRING of length 2 for EG: ab is not a PALINDROME.



Discussion

No Comment Found

Related InterviewSolutions