遍历算法的源程序内容摘要:
for(i=0。 i10。 i++) { scanf(%d,amp。 j)。 if(i==0) root=NULL。 Init(amp。 root,j)。 {} Print(root)。 getch()。 } 图的建立与深度优先搜索 typedef int arcinfo。 typedef int vexinfo。 define MAX_V_N 20。 int visited[20]。 typedef struct arode int adjvex。 struct arode *nxtarc。 arcinfo data。 {}arode。 typedef struct vnode vexinfo data。 arode *fstarc。 {}vnode。 typedef struct vnode adjlist[20]。 /*?*/ int vexnum,arum。 {}ALG。 void cr_ALG(ALG *g) int i,head,tail。 arcinfo info。 arode *p。 printf(enter the graphic’s vertex number and arc number )。 scanf(%d%d,amp。 (gvexnum),amp。 (garum))。 printf(%d,gvexnum)。 printf(enter each vertex’s data )。 for(i=0。 i(gvexnum)。 ++i) { scanf(%d,amp。 ((gadjlist[i]).data))。 (gadjlist[i]).fstarc=NULL。 {} printf(enter each arc’s head,tail,and data )。 for(i=0。 i(garum)。 ++i) scanf(%d%d%d,amp。 head,amp。 tail,amp。 info)。 p=(arode*)malloc(sizeof(arode))。 padjvex=tail。 pnxtarc=(gadjlist[head]).fstarc。 pdata=info。 (gadjlist[head]).fstarc=p。 {} } void tra_DFS(ALG *g) i。遍历算法的源程序
相关推荐
名亦既有,夫亦将知止。 知止可以不殆。 譬道之在天下,犹川谷之于江海。 第 三十三章 知人者智,自知者明;胜人者有力,自胜者强。 知足者富。 强行者有志。 不失其所者久。 死而不亡者寿。 第 三十四章 大道泛兮,其可左右。 万物恃之而生而不辞,功成而不名有。 衣养万物而不为主,可名于小;万物归焉而不为主,可名为大。 以其终不自为大,故能成其大。 第 三十五章 执大象,天下往。 往而不害,安平泰。
can bee a vessel of the highest honour. Nowadays they give up gentleness and are all for being bold; economy, and are all for being liberal; the hindmost place,and seek only to be foremost; —— ( of
94608143013 350202017312 陈九 A2 350521196410087599 350202095166 陈万添 B1 F00870394 350202098838 陈万福 C1 350211196007142544 350202095954 陈三森 B1 350221194207145516 350260004314 陈上来 E 350211195911014511
第五十四條 有機溶劑會對人體產生不良影響,應謹慎處理,從事有機溶劑作業時應注意: 一、 儘可能避免皮膚直接接觸。 二、 儘可能在抽氣櫃中使用有機溶劑。 三、 儘可能在上風位置工作,以避免吸入有機溶劑之蒸氣。 四、 工作場所只可存放當天所需使用的有機溶劑。 五、 有機溶劑之容器不論是否在使用中或不使用,都應隨手蓋緊。 第五十五條 作業期間內換氣設備應連續保持運轉,不得關閉。 第五十六條 操作電腦時