InterviewSolution
Saved Bookmarks
| 1. |
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(2^n)(c) O(n)(d) O(n^2)The question was posed to me in semester exam.The origin of the question is Longest Palindromic Subsequence in division Dynamic Programming of Data Structures & Algorithms II |
|
Answer» Correct option is (b) O(2^n) |
|