题目描述: Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of c ...
分类:
其他好文 时间:
2017-01-17 16:12:13
阅读次数:
223
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 这道题不能用long会越界,所以只能用string直接来append。精髓在于设置一 ...
分类:
其他好文 时间:
2017-01-16 07:38:42
阅读次数:
199
There is an array filled with strings, each string is composed with '0' and '1'. Given m '0' and n '1', return maximum number of strings can we compos ...
分类:
其他好文 时间:
2017-01-12 13:24:33
阅读次数:
142
1. switch语句 Only convertible int values, strings or enum variables ,即switch语句的表达式的类型只能是可以转换成int型的(向上转型,不丢失精度的),字符串类的和枚举类的 2.if语句 使用if...else语句:优先 把 包含 ...
分类:
其他好文 时间:
2017-01-10 18:00:05
阅读次数:
141
CCDictionary *strings = CCDictionary::createWithContentsOfFile("tips2.xml"); const char *hello = ((CCString*)strings->valueForKey("tp1"))->m_sString.c... ...
分类:
其他好文 时间:
2017-01-09 12:51:25
阅读次数:
230
Problem: Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All ...
分类:
其他好文 时间:
2017-01-04 09:22:42
阅读次数:
226
Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat", t = ...
分类:
其他好文 时间:
2016-12-30 20:24:23
阅读次数:
163
Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc ...
分类:
其他好文 时间:
2016-12-27 07:49:06
阅读次数:
173
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2016-12-24 07:44:15
阅读次数:
134
Be careful, split() will not include trailing empty strings in the result array The string "boo:and:foo", for example, split(":")的结果是 {“boo”, "and", " ...
分类:
其他好文 时间:
2016-12-23 09:53:08
阅读次数:
205