用邻接表表示图的BFS,DFS遍历
BFS#include <stdio.h>#include<stdlib.h>#define MaxVertexNum 10 /* 最大顶点数设为10 */typedef int Vertex; /* 用顶点下标表示顶点,为整型 *//* 邻接点的定义 */typedef struct AdjVNode *PtrToAdjVNode; struct AdjVNode{ Vertex AdjV; /* 邻接点下标 */ Pt








