NeetCode #118LC-2002MediumArrays & Hashing
← Back to All Problems#118 · #2002 · Maximum Product of the Length of Two Palindromic Subsequences(两个回文子序列长度的最大乘积)
📌 Problem Statement & Constraints
Given a string
s, find two disjoint palindromic subsequences of s and return the maximum product of their lengths. If no two disjoint palindromic subsequences exist, return 0. Constraints: 2 <= s.length <= 12, lowercase letters.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!