原题地址两个字符串满足什么条件才称得上是scramble的呢?如果s1和s2的长度等于1,显然只有s1=s2时才是scramble关系。如果s1和s2的长度大于1,那么就对s1和s2进行分割,划分成两个子问题分别处理。如何分割呢?当然不能任意分割。假设分割后s1变成了s11和s12,s2变成了s21...
分类:
其他好文 时间:
2015-01-22 13:08:38
阅读次数:
154
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-01-21 22:12:18
阅读次数:
246
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:
其他好文 时间:
2015-01-19 23:28:51
阅读次数:
244
https://oj.leetcode.com/problems/scramble-string/http://blog.csdn.net/linhuanmars/article/details/24506703publicclassSolution{
publicbooleanisScramble(Strings1,Strings2)
{
if(s1==null||s2==null||s1.length()!=s2.length())
returnfalse;
if(s1.isEmpty()&&am..
分类:
其他好文 时间:
2015-01-06 12:09:05
阅读次数:
134
问题描述:
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
/ ...
分类:
其他好文 时间:
2015-01-05 21:55:47
阅读次数:
192
题目:Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representat...
分类:
其他好文 时间:
2015-01-02 06:29:15
阅读次数:
197
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:
其他好文 时间:
2014-12-27 21:37:15
阅读次数:
192
又用强大的正则表达式和Java的字符串API水过一道题。哈哈 不过容易Runtime Error 这是最令人沮丧的事情。import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main483 {
public static void main(String...
分类:
其他好文 时间:
2014-12-23 12:34:39
阅读次数:
399
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...
分类:
其他好文 时间:
2014-12-17 12:23:10
阅读次数:
166
Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible...
分类:
其他好文 时间:
2014-12-06 12:44:32
阅读次数:
187