#3503

Longest Palindrome After Substring Concatenation I

specialist · 970 · lc medium +32 · 43.8% accepted · 82 likes · top 25%

Description

Given strings s and t, form a new string by concatenating any substring of s (possibly empty) with any substring of t (possibly empty).

Return the length of the longest palindrome that can be constructed this way.

Code

1
2
3