Skip to content

Commit 07f339f

Browse files
authored
Create Readme.md
1 parent 359b9ba commit 07f339f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • Bit_Manipulation/2002.Maximum-Product-of-the-Length-of-Two-Palindromic-Subsequences
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
### 2002.Maximum-Product-of-the-Length-of-Two-Palindromic-Subsequences
2+
3+
因为只有12个字符,我们可以暴力枚举拆解的方案,也就是2^12=4096种方法,将原字符串拆为两个subsequence。然后查看每个subsequence里面最长的回文串。
4+
5+
对于一个subsequence里面的最长回文串问题,我们可以将这个子序列转化为一个常规的字符串。求字符串里的最长回文串,这是一个经典问题。可以用o(N^2)的DP,也可以用o(N)的马拉车。

0 commit comments

Comments
 (0)