Sponsored
Use these hints if you're stuck. Try solving on your own first.
Could you generate all possible pairs of disjoint subsequences?
Could you find the maximum length palindrome in each subsequence for a pair of disjoint subsequences?
Solve with full IDE support and test cases