Which of the following problems can be solved using the longest subsequence problem?

Which of the following problems can be solved using the longest subsequence problem?
A. Longest increasing subsequence
B. Longest palindromic subsequence
C. Longest bitonic subsequence
D. Longest decreasing subsequence
 
Answer: B
Explanation: To find the longest palindromic subsequence in a given string, reverse the given string and then find the longest common subsequence in the given string and the reversed string.
 

Tìm kiếm

Back
Top