As another example, if the given sequence is “BBABCBCAB”, then the output should be 7 as
“BABCBAB” is the longest palindromic subseuqnce in it. “BBBBB” and “BBCBB” are also
palindromic subsequences of the given sequence, but not the longest ones.
As another example, if the given sequence is “BBABCBCAB”, then the output should be 7 as
“BABCBAB” is the longest palindromic subseuqnce in it. “BBBBB” and “BBCBB” are also
palindromic subsequences of the given sequence, but not the longest ones.