3503. Longest Palindrome After Substring Concatenation I
You are given two strings,
sandt.You can create a new string by selecting a substring from
s(possibly empty) and a substring fromt(possibly empty), then concatenating them in order.Return the length of the longest palindrome that can be formed this way.
A substring is a contiguous sequence of characters within a string.
A palindrome is a string that reads the same forward and backward.
1 | class Solution { |