图的深度优先遍历(堆栈实现和非堆栈实现)
// Chart.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "stdlib.h"//如:FROMHEAD = 1,则用头插法;否则:则用尾插法#define FROMHEAD 1/* 如:HASHEAD 被定义,则各顶点的邻接点链中<带起始顶点>; 否则:各顶点的邻接点链中<不带起始顶点
复制链接