Search
⌘K

Leetcode 2002. Maximum Product of the Length of Two Palindromic Subsequences

Find two disjoint palindromic subsequences of a short string (n ≤ 12) such that the product of their lengths is maximized. Because n is small, the typical approach is to enumerate subsequences (e.g., with bitmasks), check palindromicity, and combine disjoint pairs to find 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.