
图论
文章平均质量分 68
HuangHongkai_
这个作者很懒,什么都没留下…
展开
-
LeetCode 133. Clone Graph (dfs,复制图)
Given the head of a graph, return a deep copy (clone) of the graph. Each node in the graph contains a label (int) and a list (List[UndirectedGraphNode]) of its neighbors. There is an edge between the ...原创 2018-10-31 14:09:53 · 256 阅读 · 0 评论 -
LeetCode 685. Redundant Connection II (判断环,有向树,并查集)
In this problem, a rooted tree is a directed graph such that, there is exactly one node (the root) for which all other nodes are descendants of this node, plus every node has exactly one parent, excep...原创 2018-10-31 16:50:47 · 330 阅读 · 0 评论 -
LeetCode 126. Word Ladder II (构造最短路径模型)
Given two words (beginWord and endWord), and a dictionary’s word list, find all shortest transformation sequence(s) from beginWord to endWord, such that:Only one letter can be changed at a timeEach...原创 2018-11-02 17:07:13 · 277 阅读 · 0 评论