首页 > TAG信息列表 > LinkStackNode

数据结构与算法----顺序栈与链栈

栈(Stack):是限制在表的一端进行插入和删除操作的线性表。又称为后进先出LIFO (Last In First Out)或先进后出FILO(First In Last Out)线性表。 栈顶(Top)∶允许进行插入、删除操作的一端,又称为表尾。用栈顶指针(top)来指示栈顶元素。 栈底(Bottom):是固定端,又称为表头。空栈:当

链式栈的基本操作

1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 typedef int ElemType; 5 /*链栈结点*/ 6 typedef struct Node{ 7 ElemType data; 8 struct Node *next; 9 }LinkStackNode; 10 /*链栈结构*/ 11 typedef struct{ 12

链栈

c语言实现链栈   代码: #include <stdio.h>#include <malloc.h>#define FALSE 0#define TRUE 1typedef int elem;//链栈节点typedef struct node{    elem index;    struct node *next;}LinkStackNode;//链栈结构typedef struct{    LinkStackNode *top;    int lengt