Search
⌘K

Leetcode 3504. Longest Palindrome After Substring Concatenation II

Given strings s and t, pick any substring of s and any substring of t, concatenate them in order, and return the length of the longest palindrome obtainable. The core challenge is efficiently handling palindromes that may lie entirely in one string or span the s/t boundary by matching characters from s with mirrored characters from t (n ≤ 1000).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.