#define MAX_VERTICES 50
#define TRUE 1
#define FALSE 0
short intvidited[MAX_VERTICES];
typedef struct node* node_pointer;
typedef struct node{
int vertex;
struct node* link;
};
node_pointer graph[MAX_VERTICES];
int n=0; //현재 사용중인 정점들
void dfs(int v){
node_pointer w;
visited[v]=TRUE;
printf("%5d",v);
for(w=graph[v]; w; w=w->link)
if(!visited[W->vertex])
dfs(w->vertex);
}