Search
⌘K

Leetcode 1960. Maximum Product of the Length of Two Palindromic Substrings

Find two non-overlapping odd-length palindromic substrings in s that maximize the product of their lengths. The core challenge is to efficiently enumerate all odd palindromes (|s| up to 1e5) and combine best left/right palindrome lengths at every split to compute the maximum product.


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.