void DFS ( Graph G,int v ) { /*从第v 个顶点出发递归地深度优先遍历图G*/ visited[v]=TRUE; VisitFunc ( v ); /*访问第v 个顶点*/ for ( w=FisrAdjVex ( G,v ); w; w=NextAdjVex ( G,v,w ) ) if ( !visited[w] ) DFS ( G,w ); /*对v 的尚未访问的邻接顶点w 递归调用DFS*/ }