
连通性
文章平均质量分 82
jmspan
这个作者很懒,什么都没留下…
展开
-
LeetCode 261. Graph Valid Tree(判断图是否为树)
原题网址:https://leetcode.com/problems/graph-valid-tree/ Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to check whether these原创 2016-04-10 06:50:47 · 8221 阅读 · 0 评论 -
LeetCode 323. Number of Connected Components in an Undirected Graph(连通分量)
原题网址:https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/ Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), wr原创 2016-04-25 02:50:21 · 2204 阅读 · 0 评论 -
LeetCode 310. Minimum Height Trees(最小高度树)
原题网址:https://leetcode.com/problems/minimum-height-trees/ For a undirected graph with tree characteristics, we can choose any node as the root. The result graph is then a rooted tree. Among all po原创 2016-04-21 06:51:54 · 3031 阅读 · 0 评论 -
LeetCode 317. Shortest Distance from All Buildings(最短建筑距离)
原题网址:https://leetcode.com/problems/shortest-distance-from-all-buildings/ You want to build a house on an empty land which reaches all buildings in the shortest amount of distance. You can only原创 2016-04-23 09:18:04 · 3522 阅读 · 0 评论