- 14
- 0
- 约4.25千字
- 约 5页
- 2016-10-13 发布于重庆
- 举报
采用邻接矩阵完成无向图的“建立深度遍历广度遍历”操作
/* 采用邻接矩阵完成无向图的“建立、深度遍历、广度遍历”操作 */
#include stdio.h
#include string.h
#define TRUE 1
#define FALSE 0
#define OVERFLOW -2
#define OK 1
#define ERROR 0
typedef int Status;
#define INFINITY INT_MAX /*最大值“无穷”*/
#define MAX_VERTEX_NUM 20 /*最大顶点个数*/
typedef int Boolean;
typedef char VertexType[20];
typedef int VRType;
/**************以下为队列的操作************/
/****队列的类型定义****/
typedef int QElemType;
typedef struct QNode
{QElemType data;
struct QNode *next;
} QNode, *QueuePtr;
typedef struct
{
QueuePtr front;
QueuePtr rear;
} LinkQueue;
/****初始化队列****/
Status Init
原创力文档

文档评论(0)