![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
链表
永远acl
这个作者很懒,什么都没留下…
展开
-
链表基本操作
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct lnode{ int data; struct lnode *next;} lnode,*linklist;int initlist(linklist &L) //单链表初始化 { L=new lnode; L->next=NULL; return 1;}int locatedlist(原创 2021-04-02 18:59:45 · 98 阅读 · 0 评论 -
链表集合合并
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct lnode{ int data; struct lnode *next;} lnode,*linklist;int initlist(linklist &L) //单链表初始化 { L=new lnode; L->next=NULL; return 1;}int locatedlist(原创 2021-04-02 18:58:36 · 49 阅读 · 0 评论 -
单链表逆序
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct lnode{ int data; struct lnode *next;} lnode,*linklist;int initlist(linklist &L) //单链表初始化 { L=new lnode; L->next=NULL; return 1;}int locatedlist(原创 2021-04-02 18:57:12 · 48 阅读 · 0 评论 -
链表有序表合并
#include<stdio.h>#include<stdlib.h>#include<malloc.h>typedef struct lnode{ int data; struct lnode *next;} lnode,*linklist;int initlist(linklist &L) //单链表初始化 { L=new lnode; L->next=NULL; return 1;}int locatedlist(原创 2021-04-02 18:55:50 · 85 阅读 · 0 评论 -
士兵队列训练问题 list链表 hdu1276
Problem Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二报数、一至三报数直到剩下的人数不超过三人为止。Input本题有多个测试数据组,第一行为组数N,接着为N行新兵人数,新兵人数不超过5000。Output共有N行,分别对应输入的新兵人数,每行输出原创 2021-03-30 20:13:34 · 46 阅读 · 0 评论