摘要:
队列是一种限定操作的线性表,它只能在表的一段插入,另外一段取出.所以也称为先进先出数据结构(FIFO---First In First Out)C代码如下: 1 #include 2 #define maxsize 5 3 4 typedef int ElemType; 5 6 typedef ... 阅读全文
摘要:
栈的链表实现C代码如下: 1 #include 2 3 typedef int ElemType; 4 5 6 typedef struct node 7 { 8 ElemType Data; 9 struct node *next; 10 }Node; 1... 阅读全文
摘要:
栈是一种先进后出的数据结构.栈的基本操作包括:入栈,出栈,初始化栈,清空栈,遍历栈.C代码如下: 1 #include 2 3 #define MaxSize 20 4 typedef int ElemType; 5 6 7 typedef struct stack 8 { 9 El... 阅读全文