ref: http://www.mitbbs.com/article_t1/JobHunting/32952623_0_1.html
online test
---------------------------------------------------------
ref: http://www.mitbbs.com/article_t/JobHunting/32931597.html
String s1 = "
waeginsapnaabangpisebbasepgnccccapisdnfngaabndlrjngeuiogbbegbuoecccc";
String s2 = "a+b+c-";
s2的形式是一个字母加上一个符号,正号代表有两个前面的字符,负号代表有四个,也
就是说s2其实是"aabbcccc",不考虑invalid。
在s1中,找出连续或者不连续的s2,也就是说从s1中找出"aa....bb.....cccc",abc顺
序不能变,但是之间可以有零个或多个字符,返回共有多少个。在上面这个例子中,有
四个。
--------------------------------------------------------
ref: http://www.mitbbs.com/article_t/JobHunting/33043355.html
A, B两个String
//example
A = XYZ;
A^2 = XXYYZZ;
A^3 = XXXYYYZZZ;
B = XXadhflakjhelXXzzqqkkpoYYadadfhgakheZafhajkefhlZadhflkejhZfagjhfebhh
A^2 是B的subsequence, 所以
return k = 2;
A可能有重复的char, B可能有其他字符, 求k.
No comments:
Post a Comment