26. 广度优先搜索BFS的常见用法详解优化-[STL模板]
My Blog[ 我的博客 ] :新零云博客-云翼校园计划
大家可以来学习学习噢!!!
1.BFS定义—同时枚举相邻路径(巧力)
1.得到岔路口,死胡同
2.定义队列:遇到岔路口,同时遍历
BFS模板
void bfs(int s)
{
queue<int> q;
q.push(s);
大家可以来学习学习噢!!!
1.得到岔路口,死胡同
2.定义队列:遇到岔路口,同时遍历
BFS模板
void bfs(int s)
{
queue<int> q;
q.push(s);