摘要: 1 #include 2 #include 3 4 void priPointChar(char *p[]) 5 { 6 int i=0; 7 while(p[i]) 8 { 9 puts(p[i++]);10 }11 }12 13 int mai... 阅读全文
posted @ 2015-04-14 21:17 林海云 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1.现在有100亿个数字大小为1到10亿的数字,在这100亿个数字里边只有一个数字出现的次数是奇数次的,你用什么方法,找出这个数字呢? 答:显然至少要全部过一遍,可以用位运算,遍历数组,最后剩下的数字就是出现奇数次的数字(^运算 a^b^b = a)2.A和B分苹果。分苹果策略是一次一个或者两个,... 阅读全文
posted @ 2015-04-14 19:32 林海云 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 1、字符串查找strstr char * strstr(const char *s1, const char *s2); 在s1中查找s2,如果找到返回首个s2的首地址char * strcasestr(const char *s1, const char *s2); 在s1中查找s2... 阅读全文
posted @ 2015-04-14 10:27 林海云 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 解题思路:1、将字符串转置2、对转置后的字符串中单词转置 1 #include 2 #include 3 #include 4 #include 5 //字符串转置 6 void tranStr(const char *p,char *s) 7 { 8 int len = strlen(p)... 阅读全文
posted @ 2015-04-14 09:29 林海云 阅读(278) 评论(0) 推荐(0) 编辑