
栈
sunshine_BUCT_LLP
我是蓝家小师妹,最喜夷陵老祖魏无羡。
展开
-
C语言数据结构——栈、行编辑程序
/*顺序栈头文件:SeqStack.h*/ #include <stdio.h> #include <stdlib.h> #define STACKSIZE 100 typedef char DataType; typedef struct { DataType stack[STACKSIZE]; int top; }SeqStack; voi转载 2017-05-06 20:22:39 · 2583 阅读 · 0 评论 -
C语言数据结构-桟——括号的匹配检验
#include<stdlib.h> #include<stdio.h> #include<string.h> #define INIT_STACK_SIZE 20 #define STACK_INCRE_SIZE 10 typedef struct { char *base; char *top; int stackSize; }sqSta转载 2017-05-03 11:33:58 · 1045 阅读 · 0 评论 -
桟的应用——十进制转化为八进制
#include<stdio.h>#include<stdlib.h>#include<math.h>#define InitStackSize 100 //初始化分配量typedef struct SqStack{ int *base; int *top; int size; }SqStack;//初始化void InitStack(SqStack &S)原创 2017-05-02 22:13:54 · 681 阅读 · 0 评论 -
桟的应用——数制转化
#include<stdio.h>#include<stdlib.h>#include<math.h>#define InitStackSize 100 typedef struct SqStack{ int *base; //桟底 int *top; //栈顶 int stacksize; }Sqstack;//初始化桟 void InitStack转载 2017-05-02 21:06:52 · 634 阅读 · 0 评论 -
桟的链式存储结构
#include<stdio.h> #include<stdlib.h>#include<malloc.h>#define OK 1 #define ERROR 0 #define OVERFLOW -2 #define STACK_INIT_SIZE 100 //栈初始化分配量 #define STACKINCREMENT 10 //存储空间的分配增量 typedef int SEl转载 2017-05-02 15:55:42 · 411 阅读 · 0 评论 -
桟的链式存储结构分部操作
1、桟的链式存储结构简称,链桟。链桟的空其实就是top=NULL. 2、桟的链式结构基本操作typedef int ElemType; typedef int Status;//构造一个结点typedef struct StackNode{ ElemType data; struct StackNode *next;}StackNode,*LinkStackPtr;type原创 2017-05-02 15:51:28 · 429 阅读 · 0 评论 -
C语言数据结构——桟、桟的顺序存储结构表示
1、桟是限定只在表位进行插入和删除操作的线性表,我们把允许插入的一端叫作栈顶,另一端称为栈底,不含任何数据元素的桟称为空栈。桟又称为先进后出的线性表。 2、桟的插入操作称为出桟、压桟、入栈;桟的删除操作称为出桟、弹桟。3、/*桟的抽象数据类型*/InitStack(*S) //初始化操作,建立一个空桟DestroyStack(*S) //若桟存在,销毁它ClearStack(*S) //清原创 2017-04-28 09:13:22 · 1217 阅读 · 0 评论