数据结构
YoRoll_町
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
数据结构——顺序结构
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAXN 100 int i=1; typedef struct{ char num[20]; char name[50]; int sum; }Elemtype; typedef struct{ ...原创 2018-09-05 17:31:46 · 418 阅读 · 0 评论 -
数据结构——链表(几个拓展的做法)
#include <stdio.h>//注意放在c++中 #include <stdlib.h> #include <string.h> typedef struct as{ int date; struct as *next; }*linklist,lnode; void init(linklist &l) { l=(linkl...原创 2018-09-21 18:43:22 · 293 阅读 · 0 评论 -
数据结构——栈(其实是有函数的)
//顺序栈 #include <stdio.h> #include <stdlib.h> #include <string.h> const int MAXN=1000; typedef struct as{ int data[1000]; int top;//栈顶元素的下标 }seqstack; seqstack s; void init() ...原创 2018-09-21 20:07:04 · 358 阅读 · 0 评论 -
数据结构——链表(最简单的几个操作)
#include <stdlib.h> #include <string.h> typedef struct as{ int date; struct as *next; }*linklist,lnode; linklist l; int n; void init() { l=(linklist)malloc(sizeof(lnode)); l->...原创 2018-09-11 18:31:59 · 211 阅读 · 0 评论 -
队列实现的杨辉三角
//啊啊啊 //实在不知道格式是什么 还没过,明天去问问老师 #include <stdio.h> #include <stdlib.h> const int maxnsize=10000; typedef struct { int data[maxnsize]; int front; int rear; }sequeue; void init(sequeue &am...原创 2018-10-23 18:39:15 · 264 阅读 · 0 评论 -
数据结构——队列
//用链表 #include <stdio.h> #include <stdlib.h> #include <string.h> typedef struct node{//头是空的头结点,尾是正好指向最后一个数 int data; struct node *next; }Node,*queueptr; typedef struct { ...原创 2018-10-23 18:36:51 · 213 阅读 · 0 评论
分享