ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence?
Correct Answer: B — O(2^{n})
In the brute force algorithm, all the subsequences are found and the length of the longest palindromic subsequence is calculated. This takes exponential time.