Problem 1771 · Hard

Maximize Palindrome Length From Subsequences

Join the two words, fill the longest palindromic subsequence table once, and wrap each matching outer pair across the word boundary around its inner span.

Open the interactive visualisation