摘要: 题目描述: 参考后提交:并查集: class Solution: def findRedundantDirectedConnection(self, edges: List[List[int]]) -> List[int]: def find(f,x): f.setdefault(x,x) if f 阅读全文
posted @ 2019-10-15 11:46 oldby 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目描述: 方法一:dfs() O(N**2) from collections import defaultdict class Solution: def findRedundantConnection(self, edges: List[List[int]]) -> List[int]: d 阅读全文
posted @ 2019-10-15 09:52 oldby 阅读(287) 评论(0) 推荐(0) 编辑