本博文中所有例程源码均开源于Gitee仓库 - Velscode 随机深度优先搜索(Randomized depth-first search) 实现效果动画演示: 黄色代表栈中的点,红色代表当前正在访问的点