随笔分类 -  链表

摘要:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2054&cid=1156 1 #include 2 #include 3 typedef struct node 4 { 5 int data; 6 struct node *rb; 7 struct node *zb; 8 }lb; 9 lb *creat(int n)10 {11 lb *head,*p,*tail;12 int i;13 head=(lb *)malloc(sizeof(lb));14 head->rb=NULL;1... 阅读全文
posted @ 2013-03-22 22:37 海东青飞吧! 阅读(170) 评论(0) 推荐(0) 编辑
摘要:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=2056&cid=1156 1 #include 2 #include 3 typedef struct node 4 { 5 int data; 6 struct node *next; 7 }lb; 8 lb *creat(int n) 9 {10 int i;11 lb *p,*head,*tail;12 p=(lb *)malloc(sizeof(lb));13 p->data=1;14 p->next=NULL;15 he... 阅读全文
posted @ 2013-03-20 19:30 海东青飞吧! 阅读(157) 评论(0) 推荐(0) 编辑
摘要:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2122 1 #include 2 #include 3 typedef struct node 4 { 5 int data; 6 struct node *next; 7 }lb; 8 lb *creat(int n) //建立逆序链表 9 { 10 int i; 11 lb *head,*p; 12 head=(lb*)malloc(sizeof(lb)); 13 ... 阅读全文
posted @ 2013-03-11 20:37 海东青飞吧! 阅读(234) 评论(0) 推荐(0) 编辑
摘要:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1464 1 #include 2 #include 3 typedef struct node 4 { 5 int data; 6 struct node *next; 7 }lb; 8 lb *creat(int m)//建顺序表 9 {10 int i;11 lb *head,*tail,*p;12 head=(lb*)malloc(sizeof(lb));//申请空间,开辟结点13 head->ne... 阅读全文
posted @ 2013-03-11 20:32 海东青飞吧! 阅读(158) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示