2002. Maximum Product of the Length of Two Palindromic Subsequences - Medium
前往題目
思路
Brute force
- 循環把所有
mask
都走過一遍,有Match
就保留 - 只留下是
palindrome
的 - 嵌套疊代,把兩個
match
的mask
計算長度,放入結果,取最大值
這題用mask
,比較難一下就看懂在幹麻
Code
2002. Maximum Product of the Length of Two Palindromic Subsequences - Medium
https://f88083.github.io/2024/05/18/2002-Maximum-Product-of-the-Length-of-Two-Palindromic-Subsequences-Medium/