通过函数的定义来区分: 1.strstr: 返回子串出现的第一次位置 char *strstr(const char *haystack, const char *needle) 可见,strstr函数搜索的是一个const char*型的数据,即字符串常量 2.strchr: 返回字符出现的第一次 ...
分类:
其他好文 时间:
2016-10-08 20:07:36
阅读次数:
137
5510 Bazinga 题意:给出n个字符串,求满足条件的最大下标值或层数 条件:该字符串之前存在不是 它的子串 的字符串 求解si是不是sj的子串,可以用kmp算法之类的。 strstr是黑科技,比手写的kmp快。if(strstr(s[i], s[j]) == NULL),则Si不是Sj的子串 ...
分类:
其他好文 时间:
2016-10-03 19:22:16
阅读次数:
166
题目描述: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 分析: 这个题目考察的是KMP算法, ...
分类:
其他好文 时间:
2016-10-03 14:51:33
阅读次数:
226
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
其他好文 时间:
2016-10-01 12:50:07
阅读次数:
150
In this tutorial we are going to learn how we can to configure an can activate route guard in the Angular 2 router. We are going to implement the conc ...
分类:
其他好文 时间:
2016-09-30 21:34:52
阅读次数:
699
题目: Implement regular expression matching with support for '.' and '*'.'.' Matches any single character.'*' Matches zero or more of the preceding elem ...
分类:
其他好文 时间:
2016-09-30 15:15:37
阅读次数:
159
Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below ...
分类:
其他好文 时间:
2016-09-29 07:50:15
阅读次数:
190
1. Unique Characters of a String 字符串中不同的字符 Implement an algorithm to determine if a string has all unique characters. What if you cannot use additiona ...
分类:
其他好文 时间:
2016-09-28 13:04:42
阅读次数:
226
实例变量既可以在@interface中定义 也可以在@implementation中定义 在@implementation中的成员变量默认是私有的成员变量 并且和利用@private修饰的不太一样 在@implementation中定义的成员变量在其他类中无法查看 也无法访问 在@implement ...
分类:
移动开发 时间:
2016-09-28 02:17:16
阅读次数:
281
题目: Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. 官方难度: Easy 翻译: 实现atoi算法,将一个字符串转成整数。 提示:仔细考虑各种可 ...
分类:
其他好文 时间:
2016-09-28 02:03:17
阅读次数:
190