## Help authour, Buy PDF Ebook
>>>**Click Here**<<<

## Data Structure Questions and Answers-Longest Palindromic Subsequence

## Click on any option to know the CORRECT ANSWERS

Question 1 |

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

Dynamic programming | |

Recursion | |

Brute force | |

All of the mentioned |

**Visual arts Questions answers**

Question 1 Explanation:

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

Question 2 |

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

abcba | |

abba | |

abbbba | |

all of the mentioned |

**Microbiology Questions answers**

Question 2 Explanation:

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

Question 3 |

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 |

**Reading comprehension Questions answers**

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 |

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

6 | |

7 | |

8 | |

9 |

**Biology Questions answers**

Question 4 Explanation:

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

Question 5 |

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}) |

**UPSC Questions answers**

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.

There are 5 questions to complete.