© 1999-2048 dssz.net 粤ICP备11031372号
[C/C++] 图的深度、广度优先遍历
说明: /*---------------------------------------------------------------------------------------------------*/ /*图的深度优先遍历搜索递归算法。g为存储图的邻接表,i为遍历的初始顶点编号, */ void dfs(ALGraph *g,int i) { ArcNode *p = NULL; printf("%d\t", g -> adjlist[i].data); visited[i] =<zhaoye77> 上传 | 大小:3kb