📄 tree.cpp
字号:
#include<iostream>
#include"tree.h"
using namespace std;
void tree(int v)
{
visite(v);
visited[0]=1;
InitQueue(Q);
EnterQueue(Q,v);
while(!Empty(Q))
{
v=DelQueue(Q);
w=Firstadjvex(G,v);
while(w)
{
if(!visited[w])
{
visite(w);
visited[w]=1;
EnterQueue(Q,w);
}
w=Nextadjvex(G,v,w);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -