数据结构课程实验实训报告--堆栈和队列的基本操作。

  • 格式:doc
  • 大小:224.00 KB
  • 文档页数:13

下载文档原格式

  / 13
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

《数据结构》课程实验实训报告

printf("\n");

Destroy(myStack);

printf("This program is made by10273206\n"); }

2.#include

#include

#define MaxStackSize 100

typedef int DataType;

typedef struct

{

DataType stack[MaxStackSize];;

int top;

} SeqStack; /*初始化操作:*/

void StackInitiate(SeqStack *S)

/*初始化带头结点链式堆栈*/

{

S->top=0;

}

int StackNotEmpty(SeqStack S)

{

if(S.top<=0)

3.#include "stdio.h"

#include "string.h"

#include "stdlib.h"

#define MaxQueueSize 100 typedef int DataType;

typedef struct

{

DataType queue[MaxQueueSize]; int rear ;

int front;

int count;

} SeqCQueue ;

void QueueuInitiate(SeqCQueue *Q) {

Q->rear=0;

Q->front=0;

Q->count=0;

}

int QueueNotEmpty(SeqCQueue Q) {

4.#include "stdio.h"

#include "string.h"

#include "stdlib.h"

#define MaxQueueSize 100 typedef int DataType;

typedef struct

{

DataType queue[MaxQueueSize]; int rear ;

int front;

int count;

} SeqCQueue ;

void QueueuInitiate(SeqCQueue *Q) {

Q->rear=0;

Q->front=0;

Q->count=0;

}

int QueueNotEmpty(SeqCQueue Q)

四、指导老师评语

指导老师签名: