What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence?
What is the time complexity of the brute force algorithm used to find the length of the longest palindromic subsequence? Correct Answer O(2n)
In the brute force algorithm, all the subsequences are found and the length of the longest palindromic subsequence is calculated. This takes exponential time.
মোঃ আরিফুল ইসলাম
Feb 20, 2025