在国内用哪家的VPN能连上google???# PDA - 掌中宝
a*e
1 楼
请问这段程序有问题么?能通过OJ。但总觉得似乎太简洁了。。。。。有人被面试的时
候要求当场写KMP么?多谢!
char *strstr(const char *s1, const char *s2) {
const char *a = s1, *b = s2;
while(1)
{
if (!*b) return (char *)s1;
else if (!*a) return NULL;
else if (*a++ != *b++) {a = ++s1; b = s2;}
}
}
候要求当场写KMP么?多谢!
char *strstr(const char *s1, const char *s2) {
const char *a = s1, *b = s2;
while(1)
{
if (!*b) return (char *)s1;
else if (!*a) return NULL;
else if (*a++ != *b++) {a = ++s1; b = s2;}
}
}