2016年5月3日

Linux错误提示

摘要: 当程序缺乏某个头文件时,程序依然可以运行,但会在编译阶段弹出警告信息: 警告信息如下: warning: implicit declaration of function ‘htol’ [-Wimplicit-function-declaration] 编译器默认该函数会在其他的模块中定义,在链接阶 阅读全文

posted @ 2016-05-03 23:54 RenewDo 阅读(166) 评论(0) 推荐(0) 编辑

删除链表中重复的结点

摘要: 1 class Solution { 2 public: 3 ListNode* deleteDuplication(ListNode* pHead) 4 { 5 if(pHead == NULL || pHead->next == NULL) 6 return pHead; 7 ListNode *head = NULL,... 阅读全文

posted @ 2016-05-03 11:57 RenewDo 阅读(106) 评论(0) 推荐(0) 编辑

链表中环的入口结点

摘要: 1 class Solution { 2 public: 3 4 ListNode* EntryNodeOfLoop(ListNode* pHead) 5 { 6 ListNode *res=NULL; 7 if(pHead==NULL) 8 return res; 9 ListN... 阅读全文

posted @ 2016-05-03 10:29 RenewDo 阅读(152) 评论(0) 推荐(0) 编辑

字符流中第一个不重复的字符

摘要: 1 class Solution 2 { 3 public: 4 //Insert one char from stringstream 5 Solution():index_(0) 6 { 7 for(int i=0;i=0) 17 ascii[ch]=-2; 18 index_++... 阅读全文

posted @ 2016-05-03 09:57 RenewDo 阅读(160) 评论(0) 推荐(0) 编辑

导航