
数据结构
文章平均质量分 70
lzhasd
将要进电子计算机行业
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
循环列表的建立
循环列表及输出#include#includestruct s{ int date; struct s *next;};//定义结点int main(){ struct s *p,*head,*q; head=(struct s *)malloc(sizeof(struct s)); head->date=11;//定义原创 2016-10-09 19:27:38 · 735 阅读 · 0 评论 -
单链表的插入和删除
单链表的插入和删除#include#include#include#includestruct s{ int a; struct s*next;};int main(){ //srand(time(0));//随机数种子的使用但这里没使用 struct s *p,*head,*q; head=(struct s原创 2016-10-09 21:12:35 · 614 阅读 · 0 评论 -
双向链表的生成,删除,插入
双向链表的生成,删除,插入#include#includestruct s{ int a; struct s *next; struct s *prior;};int main(){ struct s*head,*p,*q,*j,*s,*k;/*head为头结点,q为开头尾节点 创建链表时使用,j为遍历列表 读取数据时使用,s原创 2016-10-10 17:47:41 · 335 阅读 · 0 评论 -
顺序表的生成、初始化、插入、删除
顺序表#include #include #define MAXSIZE 100#define OK 1typedef int datatype; //定义datatype的类型typedef struct { datatype a[MAXSIZE];原创 2016-10-13 19:14:14 · 1063 阅读 · 0 评论 -
栈的生成,进栈,出栈指令
#include#include#include#define ElemType int#define stacksizemax 100#define increase 10#define OK 0#define ERROR 1#define OVERFLOW 1typedef struct{ ElemType *top; ElemTyp原创 2016-10-15 16:33:31 · 3038 阅读 · 0 评论 -
栈求进制转换
#include#include#include#define TRUE 0#define FALSE 1#define SElemType int#define Status int#define STACK_INIT_SIZE 100#define OVERFLOW 1#define OK 0#define STACKINCREMENT 10#def原创 2016-10-19 17:47:24 · 276 阅读 · 0 评论 -
链表的建立
头插法和尾插法建立链表#include#includestruct s{ int a; struct s*next;};int main(){ struct s*head,*q,*p,*l,*s; //头插法 head=(structs *)malloc(sizeof(struct s));//创建头结点 hea原创 2016-10-08 19:53:03 · 263 阅读 · 0 评论