
广度优先搜索
qq_30339595
人类,诗意地栖息在大地上。
展开
-
leetcode133. Clone Graph
"""# Definition for a Node.class Node: def __init__(self, val, neighbors): self.val = val self.neighbors = neighbors"""class Solution: def cloneGraph(self, node: 'Node') -&...原创 2019-11-23 15:54:46 · 138 阅读 · 0 评论 -
leetcode126. Word Ladder II
you are offered a list of words and an initial word and a destination word.your task is to change a letter at a time and reach the end word.when I see this question,BFS suddenly bump upon me.but ther...原创 2019-11-21 11:39:13 · 197 阅读 · 0 评论 -
广搜走迷宫判断条件
1.边界2.是否走过 vis3.是否可行原创 2018-03-16 11:10:14 · 254 阅读 · 0 评论