Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr ...
分类:
其他好文 时间:
2015-04-13 19:01:32
阅读次数:
141
题目链接:Scramble String
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
...
分类:
其他好文 时间:
2015-04-07 23:33:46
阅读次数:
556
(Version 0.0)作为一个小弱,这个题目是我第一次碰到三维的动态规划。在自己做的时候意识到了所谓的scramble实际上有两种可能的类型,一类是在较低层的节点进行的两个子节点的对调,这样的情况如果我们从第一层切分点,或者说从较高层的切分点看的话,s1和s2切分点左边的子串所包含的字符的种类个...
分类:
其他好文 时间:
2015-03-15 07:06:17
阅读次数:
117
(Version 0.1)在做这道题之前,我刚刚做了Scramble String(http://www.cnblogs.com/icecreamdeqinw/p/4338731.html),所以Maximal Rectangle这道题拿来之后我的想法自然跟着惯性觉得肯定是可以用一个三维DP的解法做...
分类:
其他好文 时间:
2015-03-15 07:05:10
阅读次数:
145
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2015-03-15 00:36:38
阅读次数:
159
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2015-03-06 16:15:45
阅读次数:
149
Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2015-02-09 15:31:37
阅读次数:
149
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.
Below is one possible representation of s1 = "great":
great
/ gr ...
分类:
其他好文 时间:
2015-01-27 16:25:51
阅读次数:
169
原题地址两个字符串满足什么条件才称得上是scramble的呢?如果s1和s2的长度等于1,显然只有s1=s2时才是scramble关系。如果s1和s2的长度大于1,那么就对s1和s2进行分割,划分成两个子问题分别处理。如何分割呢?当然不能任意分割。假设分割后s1变成了s11和s12,s2变成了s21...
分类:
其他好文 时间:
2015-01-22 15:05:02
阅读次数:
132