1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. What is the time complexity of the brute...
Q.

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

A. o(1)
B. o(2n)
C. o(n)
D. o(n2)
Answer» B. o(2n)
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.

Discussion