Is It A Tree? 题目地址: https://ac.nowcoder.com/acm/problem/105905 基本思路: 并查集维护生成树的过程,每次加边时判断一下是不是会产生环,然后用存一下出现了的节点,最后判断一下这些出现了的节点是不是在一个联通块里面就行了。注意空树的情
展开全文
题目描述A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges betw
展开全文