d******u 发帖数: 1142 | 1 多谢!
http://www.1point3acres.com/bbs/thread-205852-1-1.html
bool isSubsequence(string first, string second);
判断第一个字符串是不是第二个的subsequence
string getExpansion(string toExpand, int expansion);
// getExpansion takes a string toExpand and duplicates each char in place
// EX: "abc", 2
// "aabbcc". from: 1point3acres.com/bbs
// EX: "abc", 1
// "abc"
// EX: "abc", 0
// EX: "aabbcc", 2
// "aaaabbbbcccc"
/*
3.Imagine the following problem, you are given two strings, first and second
, where first is much s... 阅读全帖 |
|