摘要: /* 广度优先搜索模板 /* void BFS(int s){ queue<int> q; q.push(s); while(!q.empty()){ 取队首; 访问队首; 弹出队首; 队首元素下一层级的元素全部入队; } } */ //参见:https://leetcode-cn.com/prob 阅读全文
posted @ 2020-11-23 00:13 cheshulin 阅读(136) 评论(0) 推荐(0) 编辑