标签:color bfs code add 队列 import style pytho app
BFS:
#1.设置队列 from queue import Queue q = Queue() #2.设置closed表 closed = set()/[] #3.开始循环 while not q.empty(): #取出 a = q.get() #判断 if a not in cloesd : #进入closed并进入下一步 closed.add()/append() q.put()
标签:color bfs code add 队列 import style pytho app
原文地址:https://www.cnblogs.com/zk505zk/p/14807974.html