![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
weixin_44018859
这个作者很懒,什么都没留下…
展开
-
数据结构的实现
#include<stdio.h> #include<stdlib.h> #define Size 5 typedef struct table{ /*每一个顺序表都有其最长长度;当前长度以及地址  原创 2019-02-18 16:35:55 · 947 阅读 · 0 评论 -
简单的栈代码实现(C语言)
/*由于栈只需要在一段进行删除插入操作,所以不用像顺序表那样采用动态存储方式 因为用数组来代替栈所以数组下标就充当了栈顶指针的作用*/ #include<stdio.h> #include<stdlib.h> //进栈操作 int push(int *stack,int top,int elem)//可理解为在名为stack的栈中将elem放在top位置 { sta...原创 2019-02-27 23:43:44 · 4067 阅读 · 0 评论 -
数据结构之顺序表的插入实现
#include&lt;stdio.h&gt; #include&lt;stdlib.h&gt; #define Size 6 #define sizeadd 4 //增加的内存空间 typedef struct table{ int *elem; int size; int length; }table; table init_table() { table tab; tab.elem=(int...原创 2019-02-18 23:25:13 · 3004 阅读 · 0 评论 -
线性表的实现
线性链表:即用链式存储结构实现的线性表,又称链表,单链表。 主要构成:头指针 头结点(加上最好,方便作) 首元结点 其他结点 实现代码: #include<stdio.h> #include<stdio.h> #include<stdlib.h> typedef struct LNode{//实现结点 int data;//数据域 ...原创 2019-02-20 15:57:03 · 426 阅读 · 0 评论