**DOWNLOAD FREE PDF** **<<CLICK HERE>>**

## Data Structure Questions and Answers-Longest Palindromic Subsequence

Congratulations - you have completed *Data Structure Questions and Answers-Longest Palindromic Subsequence*.

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%

Your answers are highlighted below.

Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Which of the following methods can be used to solve the longest palindromic subsequence problem?

Dynamic programming | |

Recursion | |

Brute force | |

All of the mentioned |

Question 1 Explanation:

All of the mentioned methods can be used to solve the longest palindromic subsequence problem.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

Which of the following strings is a palindromic subsequence of the string "ababcdabba"?

abcba | |

abba | |

abbbba | |

all of the mentioned |

Question 2 Explanation:

All of the mentioned strings are palindromic subsequences of the string "ababcdabba".

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

For which of the following, the length of the string is equal to the length of the longest palindromic subsequence?

A string that is a palindrome | |

A string of length one | |

A string that has all the same letters(e.g. aaaaaa) | |

All of the mentioned |

Question 3 Explanation:

In all the above cases, the string itself is the longest palindromic subsequence and hence the length of the longest palindromic subsequence is equal to the length of the string.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is the length of the longest palindromic subsequence for the string "ababcdabba"?

6 | |

7 | |

8 | |

9 |

Question 4 Explanation:

The longest palindromic subsequence is "abbabba" and its length is 7.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER] |

What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence?

O(1) | |

O(2 ^{n}) | |

O(n) | |

O(n ^{2}) |

Question 5 Explanation:

In the brute force algorithm, all the subsequences are found and the length of the longest palindromic subsequence is calculated. This takes exponential time.

Once you are finished, click the button below. Any items you have not completed will be marked incorrect.

There are 5 questions to complete.