上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

2015年5月15日

【leetcode】【单链表,queue】【2】Add Two Numbers

摘要: #include#includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNo... 阅读全文

posted @ 2015-05-15 18:48 ruan875417 阅读(101) 评论(0) 推荐(0) 编辑

2015年5月14日

【leetcode】【单链表】【24】Swap Nodes in Pairs

摘要: #includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNode* swap... 阅读全文

posted @ 2015-05-14 15:18 ruan875417 阅读(122) 评论(0) 推荐(0) 编辑

2015年5月13日

【leetcode】【单链表】【19】Remove Nth Node From End of List

摘要: #includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNode* remo... 阅读全文

posted @ 2015-05-13 16:42 ruan875417 阅读(142) 评论(0) 推荐(0) 编辑

【leetcode】【单链表】【203】Remove Linked List Elements

摘要: #includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNode* remo... 阅读全文

posted @ 2015-05-13 15:59 ruan875417 阅读(105) 评论(0) 推荐(0) 编辑

【STL源码剖析读书笔记】【第4章】序列式容器之stack和queue

摘要: 一、stack1、stack概述stack是一种先进后出(First In LastOut,FILO)的数据结构,它只有一个出口。stack允许新增元素,移除元素、取得最顶端元素,但不允许有遍历行为。由于stack系以底部容器完成其所有工作,而具有这种“修改某物接口,形成另一种风貌”之性质者,称为a... 阅读全文

posted @ 2015-05-13 13:59 ruan875417 阅读(211) 评论(0) 推荐(0) 编辑

2015年5月12日

【leetcode】【单链表】【82】Remove Duplicates from Sorted List II

摘要: #include#includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNo... 阅读全文

posted @ 2015-05-12 16:29 ruan875417 阅读(113) 评论(0) 推荐(0) 编辑

【leetcode】【单链表】【83】Remove Duplicates from Sorted List

摘要: #include#includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNo... 阅读全文

posted @ 2015-05-12 15:45 ruan875417 阅读(109) 评论(0) 推荐(0) 编辑

2015年5月11日

【STL源码剖析读书笔记】【第4章】序列式容器之deque

摘要: 1、deque概述deque是一种双向开口的连续线性空间,可以在头尾两端分别做元素的插入和删除操作。deque没有容量的概念,它是动态地以分段连续空间组合而成,随时可以增加一段新的空间并链接起来。2、deque的中控器deque由一段一段的定量连续空间构成。一旦有必要在dequer前端或尾端增加新空... 阅读全文

posted @ 2015-05-11 20:15 ruan875417 阅读(154) 评论(0) 推荐(0) 编辑

【leetcode】【单链表】【142】Linked List Cycle II

摘要: #includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: ListNode *dete... 阅读全文

posted @ 2015-05-11 16:22 ruan875417 阅读(112) 评论(0) 推荐(0) 编辑

【leetcode】【141】Linked List Cycle

摘要: #includeusing namespace std;struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}};class Solution {public: bool hasCycle(... 阅读全文

posted @ 2015-05-11 15:14 ruan875417 阅读(87) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

导航