摘要:
题目描述: 参考后提交:并查集: class Solution: def findRedundantDirectedConnection(self, edges: List[List[int]]) -> List[int]: def find(f,x): f.setdefault(x,x) if f 阅读全文
摘要:
题目描述: 方法一:dfs() O(N**2) from collections import defaultdict class Solution: def findRedundantConnection(self, edges: List[List[int]]) -> List[int]: d 阅读全文