what if the to-be-removed element pair is independent of the whole tree?
for example, the input:
[[1,2], [1,3], [4,5]]
It will form two trees without any conflict. In the problem it says:We can remove exactly one redundant pair in this "tree" to make the result a tree.
By this definition, in order to make the result A tree, the branch [4,5] should be removed.
Instead, the "popular" answer tends to consider as a valid case and no branch should be removed.
So, the problem description is wrong.