上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: bitcount函数 计算出正整型x中位为1的个数。int bitcount(unsigned int x){ int res; for (res=0;x!=0;x>>=1) { if(x&1) res++; } return res;}//利用 表达式x... 阅读全文
posted @ 2015-03-05 14:16 雄哼哼 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 函数原型:extern char *strcat(char *dest,char *src) 参数说明:dest为一个目的字符串的指针,即被连接的字符串(在前),src为一个源字符串的指针(在后)。所在库名:#include 函数功能:把src所指字符串添加到dest结尾处实现字符串的连接,连接过程... 阅读全文
posted @ 2015-03-05 14:12 雄哼哼 阅读(287) 评论(0) 推荐(0) 编辑
摘要: C语言标准库函数strcpy,把从src地址开始且含有NULL结束符的字符串复制到以dest开始的地址空间。已知strcpy函数的原型是:char *strcpy(char *dst, const char *src);实现strcpy函数解释为什么要返回char *假如考虑dst和src内存重叠的... 阅读全文
posted @ 2015-03-04 21:19 雄哼哼 阅读(553) 评论(0) 推荐(0) 编辑
摘要: //删除c语言程序中所有的注释语句,要正确处理带引号的字符串与字符串常量#include using namespace std;#define MAXLINE 1000void rcomment(int c);void in_comment(void);void deleteTail(void);... 阅读全文
posted @ 2015-03-04 20:36 雄哼哼 阅读(2056) 评论(0) 推荐(0) 编辑
摘要: 一腾讯(20114月):(所报职位:后台开发工程师–深圳)腾讯是我一直准备的公司,所以对笔试的知识点及面试侧重点有一定的了解。@笔试一份2个小时卷子,挺基础的,具体什么题记不清楚了。涉及网络原理,c/c++语言基础及高级机制,基础数据结构及算法,数据库,linux基础,linux下可执行文件组织机制... 阅读全文
posted @ 2015-03-04 20:07 雄哼哼 阅读(280) 评论(0) 推荐(0) 编辑
摘要: //该程序读入一组文本行,并把最长的文本打印出来。#include using namespace std;#define MAXLINE 1000int getline(char line[],int lim);void copy(char from[],char to[]);int main()... 阅读全文
posted @ 2015-03-04 18:36 雄哼哼 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 最长回文子串动态规划的方法的参考Palindrome Partitioning (回文子串题)代码:class Solution {public: string longestPalindrome(string s) { int n=s.size(); int dp... 阅读全文
posted @ 2015-03-03 19:14 雄哼哼 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文
posted @ 2015-03-03 17:08 雄哼哼 阅读(223) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a1... 阅读全文
posted @ 2015-03-02 21:42 雄哼哼 阅读(177) 评论(0) 推荐(0) 编辑
摘要: There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[... 阅读全文
posted @ 2015-01-24 17:05 雄哼哼 阅读(245) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页