Advertisement

数据结构与算法 7.7至7.8节:无向图及其连通分量与生成树

阅读量:
复制代码
    #include<stdio.h>
    #include<string.h>
    #include<stdlib.h>
    
    #define TRUE 1
    #define FALSE 0
    #define OK 1
    #define ERROR 0
    #define INFEASIBLE -1
    #define OVERFLOW -2
    
    #define MAXSIZE 20  //最大顶点数
    typedef int Status;
    typedef int ElemType;
    typedef struct CSNode
    {
    ElemType data;
    struct CSNode *firstchild,*nextsibling;
    }CSNode,*CSTree;
    
    typedef int Boolean;
    Boolean Visited[MAXSIZE];  //访问标志数组
    
    #define  INFINITY 65535   //最大值∞
    #define MAX_VERTEX_NUM 20  //最大顶点个数
    
    typedef int Status;
    typedef i

全部评论 (0)

还没有任何评论哟~