2018年6月5日

判断一个图是否为普通的树

摘要: 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), w 阅读全文

posted @ 2018-06-05 22:31 mdumpling 阅读(4485) 评论(0) 推荐(0) 编辑

判断联通子图的个数

摘要: [LeetCode] Number of Connected Components in an Undirected Graph 无向图中的连通区域的个数 Given n nodes labeled from 0 to n - 1 and a list of undirected edges (ea 阅读全文

posted @ 2018-06-05 21:55 mdumpling 阅读(1327) 评论(0) 推荐(0) 编辑

导航