You are given a s. You need to choose two disjoint palindromic substrings of odd length from s such that the product of their lengths is maximized.
Return the maximum possible product of the lengths of the two substrings.
Note: A substring is a contiguous sequence of characters within a string. A string is palindromic if it reads the same forward and backward. Two substrings are disjoint if they do not share any indices.
Constraints:
s.length
s consists of lowercase English letters.
You are given a s. You need to choose two disjoint palindromic substrings of odd length from s such that the product of their lengths is maximized.
Return the maximum possible product of the lengths of the two substrings.
Note: A substring is a contiguous sequence of characters within a string. A string is palindromic if it reads the same forward and backward. Two substrings are disjoint if they do not share any indices.
Constraints:
s.length
s consists of lowercase English letters.