码迷,mamicode.com
首页 >  
搜索关键字:linklist    ( 405个结果
Summary For the LinkList
Keep in mind that there are two ways to deal with the LinkList very easily.1. Using the vector to store every item of the list, then we can use the in...
分类:其他好文   时间:2015-04-14 09:48:06    阅读次数:141
Leetcode 24 Swap Nodes in Pairs
/** * ID: 24 * Name: Swap Nodes in Pairs * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium ...
分类:其他好文   时间:2015-04-14 07:10:45    阅读次数:127
Leetcode 92 Reverse Linked List ii
/** * ID: 92 * Name: Reverse Linked List * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium ...
分类:其他好文   时间:2015-04-14 07:04:18    阅读次数:192
一元多项式的加法和乘法
#include #include using namespace std; typedef struct { int coef; //系数项 int exp; //指数项 }ElemType; typedef struct Node { ElemType data; struct Node *next; }LNode,*LinkList; void InitList(Lin...
分类:其他好文   时间:2015-04-13 09:35:43    阅读次数:141
Leetcode 2 Add Two Numbers
/** * ID: 2 * Name: Add Two Numbers * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium * Pro...
分类:其他好文   时间:2015-04-13 06:54:00    阅读次数:169
单链表(不带头结点)
#include #include typedef int ElemType; typedef struct Node { ElemType data; struct Node *next; }LNode,*LinkList; void InitList(LinkList &l); void Create_head(LinkList &l); void Create_rear(Lin...
分类:其他好文   时间:2015-04-12 14:48:41    阅读次数:168
Leetcode 61 Rotate List
/** * ID: 61 * Name: Rotate List * Data Structure: Linked List * Time Complexity: * Space Complexity: * Tag: LinkList * Difficult: Medium * Probl...
分类:其他好文   时间:2015-04-12 06:40:01    阅读次数:177
用C语言实现单链表的各种操作
#include #include struct LinkList { int data; struct LinkList *next; }; /*初始化链表*/ void init_list(LinkList **head) { *head=(LinkList *)malloc(sizeof(LinkList)); (*head)->next=N...
分类:编程语言   时间:2015-04-11 09:03:35    阅读次数:232
leetcode24:Swap Nodes in Pairs
题目:Given a linked list, swap every two adjacent nodes and return its head. For example, Given 1->2->3->4, you should return the list as 2->1->4->3. Your algorithm should use only constant space. You...
分类:其他好文   时间:2015-04-09 11:56:25    阅读次数:148
单链表逆序的三种方法
一、不使用额外存储空间的逆序LinkList ReverseLink(LinkList L){ LinkList *next; LinkList *prev = NULL; LinkList *head = L->next; while(head != NULL) { ...
分类:其他好文   时间:2015-04-08 14:48:44    阅读次数:112
405条   上一页 1 ... 30 31 32 33 34 ... 41 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!